Given the total number of tasks and a list of prerequisite pairs, return the ordering of tasks you should take to finish all tasks. If it is impossible to finish all tasks, return an empty array.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.