Top 50 traversal Interview Questions
The most frequently asked traversal 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 DigitalReturn the breadth-first traversal order of a directed HP IQ graph while avoiding repeated visits.
Hp Iq
Munich Re
athenahealthDetect circular Tencent Cloud TKE service dependencies using DFS node coloring.
Tencent
Cloud Security Services
AltenReturn a deterministic depth-first traversal of an HP IQ directed graph using an explicit stack and cycle detection.
Hp Iq
Manpower BelgiumSign up to see every question
Create a free account to unlock this list and practice real interview questions.
Return a binary tree's inorder traversal using Morris traversal with O(1) auxiliary space.
Josh TechnologyJJosh Technology Group
HarnessUse topological ordering and dynamic programming to recover the longest dependency pipeline in a directed acyclic graph.
RAMP Consulting Group
RivianDetect cycles with Floyd's algorithm, then reverse an acyclic Kraft Heinz product feed linked list in place.
Kraft Heinz
MillimanReturn the path to a Bloomberg Terminal topic in a nested hierarchy using iterative depth-first search.
Bloomberg
Ethos Life