← Questions

Resumable iterators that save and restore their position

0
OpenAISpaceXAICodingLast asked Nov 2026

A coding interview question asked in OpenAI's agentic coding (beta) round and at SpaceXAI, last asked Nov 2026. It tests iterators, object-oriented design and serialization.

Design an iterator that can save its position as a small, portable checkpoint and later be rebuilt from it, even in a new process, so iteration continues exactly where it stopped: no element skipped, none repeated. Build it in stages on…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • OpenAI · Agentic coding (beta) · Last asked Nov 2026An existing codebase and changes too large to write by hand; you work through them with an AI coding agent · An AI coding agent is expected
  • SpaceXAI · Onsite applied coding · Last asked Apr 2026Two or three rounds, in person (Palo Alto for many roles)

What it tests

iterators · object-oriented design · serialization

Your code and the AI tutor open when you unlock this question.