A stateful pass over sorted events, which most candidates get working in ten minutes. The reason it is asked is the next ten: in this domain a false positive is a person accused of something.
From a stream of badge scans, find the employees whose movements are impossible.
A stateful pass over sorted events, which most candidates get working in ten minutes. The reason it is asked is the next ten: in this domain a false positive is a person accused of something.
Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.
The code is not the discriminator here, the tie-break is. Leaving one room and entering the next in the same second is what a normal person does at adjacent doors, so processing entries before exits within a timestamp manufactures a violation for the most ordinary behavior on the badge system. Candidates who ask what the timestamp resolution is, and what happens when two scans share one, are the ones who have debugged a log pipeline. The second discriminator is whether they say out loud that a missing scan and a real violation are indistinguishable in this data.
No comments yet — be the first to share your approach.
