InterviewLegend

Streams & Incremental State

Alex Chen46 min readUpdated 32 real interview reports

Jane Street's software rounds often use the setting of a market-data feed. Prices and quotes arrive as a stream, some messages come out of order or never arrive, and every number downstream depends on a handler keeping a small state correct. The habit these problems reward is updating only what changed, which is also how the firm builds its own tools. It maintains an open-source OCaml library, Incremental, that recomputes only the part of a calculation an input change touches.

Every problem here is a handler that sees one event at a time. Some keep a running statistic in constant space. Others decide how two feeds interleave, what to do with a message that arrives late, and how to turn updates that only appear when a price moves into the evenly spaced rows research code expects. The arithmetic stays simple. The hard part is the state you carry between events and the one edge case that breaks it.

Rescanning the window on every tick passes the first test, then falls apart when the interviewer asks for the cost per message on a busy feed. Determinism counts as much as speed. A merge that breaks timestamp ties one way today and another way tomorrow gives two different replays of the same session, and anyone debugging a bad fill needs the replay to match what happened.

Jane StreetPremium lesson · Coding round

The 6 Jane Street problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 3 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Jane Street questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Jane Street interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Jane Street interview guide

Know what Jane Street asks before you walk in.

31 coding · 5 system design · 16 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.