DoorDash Interview Question

Leetcode medium binary search problem