Top 50 bfs Interview Questions
The most frequently asked bfs questions across all roles and companies, ranked by real interview frequency. Updated daily.
Use BFS to compute shortest path distances from a source node to every node in an unweighted graph.
Unity
NTT DATA
Telus DigitalUse BFS to reconstruct the shortest route between two nodes in an Air Space Intelligence Flyways graph.
Air Space Intelligence
Nuro
C3.aiUse iterative DFS coloring to detect circular dependencies in an Applied Intuition simulation module graph.
Applied Intuition
KLA
NextdoorCount four-directionally connected islands in a 2D grid using BFS or DFS.
Build a lexicographically smallest rollout order for Zscaler policy services, or detect an impossible dependency cycle.
Zscaler
Canonical
NuroSign up to see every question
Create a free account to unlock this list and practice real interview questions.
Find the minimum-cost path in a weighted graph using Dijkstra's algorithm and reconstruct its node sequence.
Costar Group
VBeyond
Decision PointUse breadth-first search to return reachable Delta DIAView assets grouped by distance from a starting asset.
UBS
Delta Electronics Americas
ThemesoftDetect whether a directed graph contains a cycle using depth-first search and recursion-state tracking.
Huron Consulting Group
Microsoft