Giving back to the community. Good luck folks!

1. Phone Screen

variation of https://leetcode.com/problems/binary-tree-maximum-path-sum/

2. System Design

domain knowledge: most challenging project, what was a particular challenge
system design: design yelp reviews

3. Coding / Craft

given a list of dasher pickups / dropoffs (timestamp, status) calculate how much dasher should get paid (+1 rate multiplier for each concurrent order dasher picks up, -=1 as they drop one off)

some followups about edge cases

4. Coding / Debugging

this is where my interview went awry, interviewer was very opinionated and dominated the conversation too much, and kept shooting down any refactoring attempts to resolve bug.

problem: given some bug in this system where a random index is picked (index -> dasher ID) you need to find bug where the indexes get messed up. Interviewer was suggesting dictionary mapping but the __init__ method hadn't even initialized any data structure. I pointed out that an array is literally just that, why would i use a dictionary, and he insisted I use a dictionary. Basically this is the bug

random_index = 2
{1: dasher_1, 2: dasher_2, 3: dasher_3, 4: dasher_4}
pop(2) -> dasher_2
and they want this
{1: dasher_1, 2: dasher_4, 3: dasher_3}
but the bug is that they first pop() and then try to swap the last item... but they try to get the last item by using len(mapping) which is at this point len 3

this is literally https://leetcode.com/problems/insert-delete-getrandom-o1 but with a bug

My advice would be to just view everything as wrong and re-write it the way you would have if the existing code wasn't there. I probably got unlucky with my interviewer

5. Behavioral

  • tell me about most challenging project
  • tell me about a time you went above and beyond
  • tell me about feedback you got
  • what would you do if DoorDash missing/wrong orders are going up
  • tell me about bug/failure you had
Comments (4)