1p3a Question · Nov 2025

Visa CodeSignal Online Assessment Interview Questions and Experience

Question Details

Problem 1: Count Triple Substrings Iterate through a string to find substrings of length 3. Count how many times the first character and the last character of that substring are identical. * Input

Full Details

Problem 1: Count Triple Substrings Iterate through a string to find substrings of length 3. Count how many times the first character and the last character of that substring are identical. *

Input: "" ->

Output: 0 *

Input: "abc" ->

Output: 0 (Based on code logic provided) *

Input: "abcxccc" ->

Output: 2

python def count_triples(text): count = 0 for i in range(len(text) - 2): if text[i] == text[i+2]: count += 1 return count

Problem 2: Maximum Recursive Digit Sum For a list of numbers, calculate the recursive sum of digits for each number until a single digit remains.

Return the maximum single-digit value found. *

Example Process: [123, 456, 789, 101] * 123 -> 1+2+3 = 6 * 456 -> 4+5+6 = 15 -> 1+5 = 6 * 789 -> 7+8+9 = 24 -> 2+4 = 6 * 101 -> 1+0+1 = 2 *

Result Max(6, 6, 6, 2) ->

Output: 6

python def digit_root(n): while n > 9: s = 0 for ch in str(n): s += int(ch) n = s return n def max_digit_root(readings): roots = [digit_root(num) for num in readings]

**return** max(roots)

About This Question

This is a reported interview question from a visa interview for a swe role during the oa round reported in 2025.

It covers the following topics: Recursion, Strings .