InterviewLegend

Parsers & Interpreters

Alex Chen44 min readUpdated 32 real interview reports

Parsing problems show up in Jane Street's software rounds because text reaches a trading system in many forms. Exchange feeds arrive as lines, risk limits live in small config formulas, and engineers who write OCaml all day work in editors that understand brackets. Parsers also suit the round's habit of growing one problem, since a parser that handles three cases cleanly can take a fourth with one new branch.

The problems here run from a line-level Premium question up to a small interpreter with variables and loops, with two editor features built on bracket matching at the end. Each one splits into a reader that turns characters into structure, like a record, a token list, a tree or a table of partner positions, and a consumer that works over that structure. Keep the two apart and the follow-ups stay small.

Turn raw characters into typed tokens before anything else looks at them, and let a malformed input come back as a value the caller can inspect. A version that throws on bad input looks out of place at a firm whose Core library has an Or_error type for that job. You don't need OCaml to show the idea. A Python function that returns a tagged error with a line number makes the same point.

Jane StreetPremium lesson · Coding round

The 5 Jane Street problems are below.

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

+ 2 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.