InterviewLegend

Graphs, Grids & Trees

Alex Chen45 min readGuide updated

Graph questions in Visa's live rounds are mostly classics with a small turn. A Premium question is the one that repeats. It came up in January 2026, and again in August 2026, when a Software Engineer I candidate solved it with DFS, solved it again with BFS and then compared the two. The other three come from the last twelve months too. There's a tree handed to you as an adjacency matrix (November 2026) and a Premium question (August 2026). Last comes a trip rebuilt from unordered city pairs, from April 2026, with an older report from May 2025.

Four problems, one family. Each is a traversal over neighbors, and what changes is the container you pull the next node from and what you remember about nodes you've already seen. A stack gives DFS and a queue gives BFS. A heap ordered by distance turns BFS into Dijkstra.

The Visa angle
Expect a second pass over the same problem. The August 2026 interviewer wanted islands with DFS, then with BFS, then a comparison of the two. In September 2026 a candidate had to write their own tests and main. Practice saying why you chose a traversal, and practice running your code without a harness.

VisaPremium lesson · Coding round

The 4 Visa problems are below.

  1. A Premium questionCoding · Medium · Frequently asked
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 1 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Visa questions

$49 a year · all 108 companies · instant access

20,000+ candidate reports

Visa interview guide

Know what Visa asks before you walk in.

30 coding · 8 system design · 20 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Visa interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.