DoorDash interview question

recursion questions