Top 50 topological sort Interview Questions
The most frequently asked topological sort questions across all roles and companies, ranked by real interview frequency. Updated daily.
Return a lexicographically smallest topological ordering of Siemens NX modules, or detect a dependency cycle.
Siemens Digital Industries Software
CanvaReturn a valid course completion order from prerequisite pairs using Kahn's topological sorting algorithm.
OracleReturn a topological ordering of tasks using a queue and indegree counts, or return an empty list if a cycle exists.
Diversified
SpeechifyReturn the lexicographically smallest valid AMD ROCm build order using Kahn's topological sort and a min-heap.
Advanced Micro Devices
ABBUse Kahn's topological sort and a min-heap to produce a deterministic execution order for dependent Lattice mission tasks.
Anduril IndustriesReturn a valid execution order for Netflix pipeline stages using Kahn's topological sort, or report a dependency cycle.
NetflixReturn a deterministic topological order for TikTok video-processing steps, or detect an impossible dependency cycle.
TikTokUse Kahn's topological sort and a min-heap to order Speechify Reader segments while detecting dependency cycles.
SpeechifySign up to see every question
Create a free account to unlock this list and practice real interview questions.