Heaps & Intervals
A lot of what a trading firm computes is a running answer over a feed that never stops arriving. Think of the mid-price of a book as quotes update, or the median trade size over the last stretch of a session, or the earliest event across a set of market-data channels. Each is a question you answer again after every new tick, not once over a finished array. That is the shape this family tests. A heap gives you the current extreme of a moving set in constant time and re-ranks in log time. An interval sweep answers coverage over a line. Both show up wherever the prompt smells like an order book or a feed handler.
These are canonical problems, asked close to the way you already know them, so there is no disguised trick to unpick. The pressure is the one this loop applies everywhere. The online assessment runs on HackerRank against hidden tests, and a full pass is the expectation. The live rounds run in a shared editor that sometimes shows you a single visible case. You verify correctness yourself. The reject that stings most in this family is not a wrong algorithm. Candidate reports describe a median-from-a-stream answer whose only named miss was a missing base case for the empty stream. A clean heap you can write without fumbling, plus the base case surfaced before anyone asks, is what buys you the follow-up.
- 3 problems, worked step by step
- about 22 min
Premium lessonCitadel interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Citadel interview guideKnow what Citadel asks before you walk in.
12 coding · 5 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.