DoorDash Interview Question

2 algorithm questions (back to back)