Hudson River Trading·Software Engineer·Technical Phone Screen
- A lab has a single molecular reactor that processes one sample at a time, taking exactly 5 minutes (300 seconds) each. Samples arrive at integer timestamps. A cooling chamber holds at most 10 waiting samples. If a sample arrives when the chamber is full, it gets rejected. If a sample arrives exactly when another finishes processing, the chamber sample goes next and the new arrival waits. Given a sorted list of arrival times, return the time when all accepted samples finish processing.
“The queue simulation part was fine but I kept second-guessing the tie-breaking rule.”