Top 50
Topic roadmap
Updated weekly · Last refresh Oct 30

Top 50 bfs Interview Questions

The most frequently asked bfs questions across all roles and companies, ranked by real interview frequency. Updated daily.

50questions
~21htotal time
118companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
bfsStart here. 14 questions · ~350 min
Shortest Paths in Unweighted GraphEasy
Practice
Recently asked

Use BFS to compute shortest path distances from a source node to every node in an unweighted graph.

bfstraversalGraphsUnityNTT DATATelus Digital
Bottom View of Binary TreeMedium
Practice

Print the bottom view of a binary tree using breadth-first traversal and horizontal distance tracking.

bfsData StructuresAlgorithmsIInfibeam AvenuesSiemensMakeMyTrip
More bfs questions with a free account
2
dfs12 questions · ~300 min
Number of IslandsMedium
Practice
Recently asked

Count four-directionally connected islands in a 2D grid using BFS or DFS.

dfsbfsAlgorithmsAAmazon Kuiper Manufacturing EnterprisesCChatham FinancialAADCI - Karnataka
Cycle Detection in Dependency GraphEasy
Practice
Recently asked

Use iterative DFS coloring to detect circular dependencies in an Applied Intuition simulation module graph.

dfsbfsGraphsApplied IntuitionKLANextdoor
Course Schedule With Cycle DetectionHard
Practice
Recently asked

Use topological sorting to detect course dependency cycles and return a valid completion order.

dfsbfscycle detectionSnapGooglePPiramal Finance
More dfs questions with a free account

Sign up to see every question

Create a free account to unlock this list and practice real interview questions.

Get my prep plan
3
Arrays11 questions · ~275 min
Rotting Oranges With BFSMedium
Practice
Recently asked

Use multi-source BFS to find the minimum time for all reachable fresh oranges to rot.

ArraysbfsAlgorithmsAutodeskAmazon Web ServicesKKotak
More Arrays questions with a free account
4
Recursion3 questions · ~75 min
More Recursion questions with a free account
5
More topics10 questions · ~250 min
Top View of Binary TreeMedium
Practice
Recently asked

Print a binary tree's top view from left to right using breadth-first traversal and horizontal distances.

CodingbfsAlgorithmsFFlexcarPayUNVIDIA
Binary Tree TraversalMedium
Practice
Recently asked

Traverse a binary tree level by level, alternating left-to-right and right-to-left order with BFS.

CodingbfstraversalWWhatfixCompassWarner Bros. Discovery
More questions with a free account
The finish line: interview-readyComplete all 50 questions to finish this plan.