InterviewLegend

Interfaces & Abstractions

Alex Chen28 min readUpdated 32 real interview reports

Jane Street writes OCaml, where programmers spend their days writing one module against another module's signature, and its interviews carry that habit. A round gives you a small interface, sometimes only two calls, and asks for a richer one built strictly on top of it. Then the thing underneath changes shape. A layer that relied on details it happened to see has to be rewritten while the clock runs.

The easiest problem here sorts words through a comparison passed in as a value. The hardest builds files on a disk that only reads and writes whole blocks, and in between is a cursor over a nested store that later grows into a tree. They vary a lot in size, but all three come down to the same step. Before your layer's first method exists, write down what it promises and what it assumes from the layer below.

Shortcuts are what break these layers, like peeking at a list length the cursor was never promised or guessing a file size from its block count. In Python, Java or C++ you express the same idea with an abstract class or an interface type, so no OCaml is needed. The interviewer's checks are concrete. Swapping the comparer shouldn't change the sort, and a disk with too few free blocks should make the file system refuse the write before a single block changes.

Jane StreetPremium lesson · Coding round

The 3 Jane Street problems are below.

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

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.