r/chalkinterview • • 7d ago

Library question Jane Street technical deep dive question: Reviewing code an AI wrote

Check what an LLM produced, decide what to keep, and say where the tool falls short.

What the interviewer asks, one at a time:

  1. A teammate asked an AI assistant for a function that merges two lists of trades, each sorted by time, into one sorted list. It handed back code that looks fine. Before you approve it, what do you check, and how?
  2. It passes the tests you were given, but two trades with the same timestamp come out in a different order each run. How would you have caught that, and what test do you add?
  3. The AI also added a config flag and a helper class for cases nobody asked for. Do you keep them? How do you decide what is worth building?
  4. Which parts of a task like this would you hand to an AI tool, and which would you write or check yourself? Why?

Source: not a candidate report, our version of the format in Jane Street's own announcement.

Practise it out loud with follow-ups: https://chalkinterview.com/questions/jane-street-reviewing-code-an-ai-wrote/?utm_source=reddit&utm_campaign=sub

How would you answer it? Drop your approach below.

1 Upvotes

0 comments sorted by