FDEInterviews logoFDE/Interviews
Coding & DSA / 92
mediumNewPalantirScale

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.

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.

Unlock the other 496 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

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.

DISCUSSION · 0

No comments yet — be the first to share your approach.