โ† Amazon questions

Dependency Ordering using Topological Sort

Filed under Amazon

Given a directed graph represented by a number of nodes and a list of prerequisite pairs, return the ordering of tasks you should take to finish all courses.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.