DoorDash interview question

Leetcode medium questions involving graphs and binary search