I had two phone screen rounds, one coding and one design.
The coding round was a fault tolerant queue. I had to implement enqueue, reserve, fail, and a DLQ, and there were 7 unit tests that all had to pass. Part 2 added task dependencies.
Each task comes with a cooldown after it gets preempted, and you have to use the preempt timestamp to work out yourself when the cooldown ends. Also, when a task is put back in the queue, it has to be ordered by its original enqueue time. I missed this one, so the unit tests did not all pass, and that ended in tragedy.
The design round was to design a typing race game. Specifically, a typing race game for 2 to 8 players: the game generates a passage, the players type it, and whoever finishes first wins. If you mistype a letter, the game forces a 1 second cooldown on that player. I had to design the cooldown and unfreeze mechanism, and how to match players. The follow-ups were ranking players by score, and how to reduce the network delay differences between players so the game stays fair.
The next morning I got the tragic news.
Discussion
Loading comments…