Waymo phone screen - Rejected, sharing the coding q
Waymo phone screen - Rejected, sharing the coding q
Sharing this for anyone prepping for Waymo. Did the phone screen a few weeks back, got rejected shortly after, so figured I'd write it up.
The coding problem was about tracking car occupancy in a parking garage across n discrete timestamps. Each entry/exit ticket gives you a range where the car is present, counted at both endpoints but not the slot right after exit. You need to return an array showing how many cars are in the garage at each timestamp.
Straightforward to brute force but the interviewer nudged me toward a cleaner approach. Basically a difference array: bump the count at entry, drop it at exit+1, then take a running prefix sum across the whole array. Got there after a few minutes of back-and-forth.
Follow-ups were solid: what if your timestamps are sparse, like millions of possible values but only a handful of actual events? I switched to a sorted map. Then he asked how to optimize space if you only need point queries instead of the full occupancy array. Talked through lazy evaluation.
Felt pretty solid on coding tbh. Got rejected with no feedback a week later. Not gonna lie, kinda expected it after reading that their data fluency round is basically impossible to prep for. Never even made it to VO.
Hope this helps someone at least.