loopprep

OpenAI coding interview prep

Practice for OpenAI coding interviews.

OpenAI-style loops are practical and multi-step: build a working solution, then keep extending it while every earlier test still has to pass. These are the questions candidates report from OpenAI loops.

Python and TypeScript · 16 questions reported at OpenAI

loopprep Transactional Key-Value Store

Transactional Key-Value Store

Hard 45 min Asked at Anthropic OpenAI xAI

Grow a plain dictionary into a store — then keep extending it while the old tests still have to pass.

  1. ▸ Step 1 · Set and get 00:00
  2. Step 2 · Delete and count Locked
Step 1 — Set and get. Implement set(key, value) and get(key). get returns null for a missing key.
solution.js
Files
▸ solution.js
  test_kv.js
Terminal Clear
$ playing…

How it works

Build it once. Then keep extending it.

This Rate Limiter question has four steps and 45 minutes on the clock. Each step adds a requirement to the solution you have already built.

Every step re-runs every earlier test. You cannot break Step 1 to make Step 3 pass — the same constraint you face when an interviewer adds a follow-up.

“LeetCode teaches you to solve a puzzle once. Anthropic and OpenAI make you build a small system, then keep extending it while the old tests still have to pass. That is exactly what LoopPrep drills.”

The bank

16 multi-step questions reported at OpenAI.

Start with three questions now. The rest cover the same kind of evolving, practical coding problem.

Transactional Key-Value Store
Grow a plain dictionary into a store with value counts, expiring keys, nested transactions and atomic conditional batches.
Anthropic · OpenAI · xAIPython · TypeScript
4 steps · 45 min
PREMIUM · 15 QUESTIONS · 74 STEPS
Rate Limiter
Build the rate limiting layer of an API gateway, one policy at a time: fixed window, exact sliding window, token bucket, then per-tier limits with quotas and eviction.
Anthropic · OpenAIPython · TypeScript
4 steps · 45 min
GPU Credit Calculator
Track GPU credit grants that are added over time, partially spent, and expire. Then keep balance queries fast as grants pile up, and report what is about to expire.
OpenAI · PerplexityPython · TypeScript
5 steps · 50 min
Infection After K Rounds
Spread an infection across a grid for exactly k rounds, then compute when each cell falls, how long until things settle, and make it all independent of k.
OpenAIPython · TypeScript
5 steps · 45 min
+ 12 more premium questions
60 steps

Pricing

Keep practicing without a question limit.

No credits, per-question purchases, or daily run quota.

Free
$0

A complete way to experience the multi-step format.

  • 3 full questions, 14 steps
  • Unlimited runs, timers, the real test files
Start coding now
Premium
$12 / month

More full-length questions for continued interview practice.

  • All 33 questions, all 163 steps
  • Multi-file workspaces with the real test files
  • Every new question as it ships
  • Cancel any time — your progress stays
Unlock Premium · $12/mo

Cancel any time. Your saved progress stays with you.

LoopPrep vs LeetCode Premium

Different practice, cheaper price.

LeetCode is better for breadth. LoopPrep is narrower on purpose: AI-lab style follow-ups, where the system you built has to survive the next requirement.

LoopPrepLeetCode Premium
Monthly price$12 / month$35 / month
What you practiceMulti-step systems: build, then extend while old tests still passMostly single-function puzzles, solved once
Questions33 multi-step questionsThousands of problems, across many formats
Steps / timed practice163 steps · 26.7hPer-problem, not built around follow-up steps
Test cases1461, visible in a multi-file workspaceHidden tests, as in a judge
Free tier3 full questions, every step, unlimited runsMany free problems; Premium adds company tags and more
LanguagesPython and TypeScript, in your browserMany languages, in a judge
Best forAnthropic, OpenAI, and other AI-lab style loopsBreadth, company-specific tags, and algorithm recall
If you cancelProgress stays; premium steps re-lockPremium features stop at period end

LoopPrep counts on this page are not typed in: they are filled from the question bank at build time and corrected from the live catalogue on load, so they cannot go stale when a question ships. No annual equivalent is shown — LoopPrep is monthly only, and LeetCode's annual price is a different product choice, not a like-for-like monthly saving.

Questions about the questions

Details

Does my code leave the browser?

No. Pyodide and the TypeScript compiler both run in a web worker on your machine; your code and results never reach a server.

Which languages?

Python and TypeScript. 30 of the 33 questions ship in both, with the description and the tests written separately for each rather than translated. Pick the language in the question; your work is kept per language.

Can I stop mid-question?

Yes. Code, step progress and timings persist locally per question. Reset clears one question without touching the rest.

Are these real interview questions?

They are interview-style questions: one premise followed by requirements that build on working code as time runs down.

Which companies are these questions from?

Each company tag comes from candidate interview reports on public prep sites. The bank has questions reported at OpenAI, Anthropic, Perplexity, xAI, Scale AI, and Cursor. A tag means candidates described a question like it, not that the company wrote it.

Why are they all marked Hard?

They are designed to leave room for follow-ups, tradeoffs, and deeper implementation work within a timed session.

What if I cancel?

You keep every free question and everything you've already written. Premium steps re-lock; nothing you solved is deleted.

See how your solution holds up as the problem changes.

Start with a full multi-step question and practice the follow-ups that make interviews challenging.

Start coding now