DoorDash interview question

Leetcode hard problem with lower quartile acceptance rate.