Order Tasks with Dependencies Using a Deterministic Topological Sort
Company: OpenAI
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: Return the lexicographically smallest valid task order from a directed acyclic dependency graph, including disconnected and prerequisite-free tasks.