DoorDash Interview Question

Leetcode medium, given a list of prerequisites return the order these should be executed.