About

Awaitable is a set of practice problems for practical Python coding interviews. The problems cover the systems work that algorithm sites mostly skip, such as asyncio, concurrency, rate limiters, retries, batching, streaming and file I/O. You write code in the browser, run it against real tests, and compare your answer with a reference solution.

How your code runs

Code runs on Pyodide, which is CPython compiled to WebAssembly. When you first run a problem, the page loads Pyodide from the jsDelivr CDN inside a Web Worker. Your browser caches it after that. From then on your code and the tests execute on your own machine, in that worker, so the page stays responsive while tests run. This is the real CPython interpreter and standard library, so asyncio, heapq, collections, json, hashlib and pathlib behave as they do on your laptop.

Privacy

Your code is never sent anywhere. There are no accounts, no cookies and no third-party analytics. Your code autosaves to your browser's localStorage, along with which problems you've solved. Clearing this site's data in your browser resets all of it. Using a different browser or device starts you fresh, because nothing syncs.

The site keeps a few anonymous counts to decide what to build next:

  • How many times each problem was run, submitted and solved, per day. These are totals per problem. Nothing ties them to you.
  • How many people pressed I want this one on each locked problem. To count each person once, your browser keeps a random ID, and the server keeps a salted hash of your IP address that changes every day. Your IP address itself is never stored.
  • Email addresses, only when you type one into "Email me when it opens". It is used once, to tell you that problem opened. After that notice is sent, the address is deleted.

Locked problems

Only some problems are open. The rest are written and listed, and they open in order of how many people ask for them.

Limits

Pyodide runs inside the browser's sandbox, which rules out a few things:

  • No threads. threading, concurrent.futures.ThreadPoolExecutor and multiprocessing don't work, so the concurrency problems use asyncio.
  • No subprocesses and no network access. Problems that involve I/O give you a fake async dependency to call.
  • File I/O works against an in-memory file system. open, os, pathlib and tempfile all work, and the files disappear when the worker restarts.
  • Timings are approximate. The tests that check timing use generous margins, but a busy machine or a background tab can still slow a run down.
  • A run that takes longer than about 20 seconds is stopped, which catches infinite loops and deadlocks without freezing the page.

How a problem is structured

Each problem has a statement written the way an interviewer would hand it over. It gives some context, the exact function or class signature, the behaviour rules, a worked example and the constraints. It also shows a difficulty and an estimated time in minutes, which is roughly what an interviewer would budget.

The editor starts with a starter file containing the signatures. Run executes the two or three example tests from the statement. Submit runs the whole suite, edge cases included. When you're ready, reveal the reference solution and an explanation covering the approach, complexity, common pitfalls and the follow-up questions interviewers tend to ask next.

New to this format? Read the practical coding interview guide, or start with Inference Log Summary.