Visa Senior+ Software Engineer Interview Experience — Online Assessment with Perfect Substring and Connected Groups

Visa·Software Engineer·Aug 2026
Online AssessmentSenior+medium

Online Assessment

First question: Perfect Substring
Given a string s made up only of digits, and an integer k, we need to find the number of substrings that satisfy a specific condition: every distinct digit character that appears in the substring must appear exactly k times.

  1. Input: string s and integer k
  2. Output: the total count of substrings satisfying the condition
  3. Example: if s = "11020211" and k = 2, the substrings "11" ('1' appears 2 times) and "0202" ('0' and '2' each appear 2 times) both satisfy the condition

Second question: Connected Groups
Given an N x N matrix related representing a relationship network. If related[i][j] is '1', it means entity i and entity j are directly connected; if it's '0', they are not directly connected.
The connection relationship is transitive, meaning if A is connected to B, and B is connected to C, then A, B, and C belong to the same group.

  1. The task is to compute how many disjoint connected components (groups) exist in the entire network
  2. This is a classic graph connected-components problem, which can be solved using DFS, BFS, or Union-Find

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Visa
Role
Software Engineer
Level
Senior+
Rounds
Online Assessment
Difficulty
medium
Interview date
Aug 2026
Questions from this interview
2 questions

Real Visa interview experiences

First-hand reports from Visa candidates — the rounds, the questions they were asked, and how it went.

All 10 Visa interview experiences