Lexicographically smallest topological order
Given tasks and the dependencies between them, return an order that runs every task after the tasks it depends on. When several tasks are ready at once, always pick the smallest, so the order is deterministic and the lexicographically smallest valid one. Report when the dependencies contain a cycle and no order exists.
No answer yet. Write the first one; the best answer gets endorsed.
