Level: Unknown Level
Round: Phone Screen · Type: Coding · Difficulty: 5/10 · Duration: 60 min · Interviewer: Unfriendly
Topics: Algorithms
Location: San Francisco Bay Area
Interview date: 2026-01-21
Got offer: False
I had a phone screen interview. I was given a problem involving calculating payments for DoorDash employees.
The coding question I received was:
You're given a list of DoorDash employees who make a certain amount per hour, along with how long they work.
Part 1: Create a function to compute the total amount of money all the dashers make.
Part 2: You now want to pay these DoorDashers by the hour. Add a new function so you can pay people hourly. I.e., if I'm working 12-10pm and we want to pay all dashers that have worked before 5pm, this dasher's pay should be included up until 5pm. Also, consider how you can cache this info instead of repeating the calculation.
My approach: