DoorDash interview question

Code design question on a coderpad