THE MISSING NUMBER
Find the one missing number among 10 million.
- INPUT
- 9,999,999 numbers
- MEMORY
- 64 KB
We cap your memory and slow down your CPU. Squeeze your solution into as few bytes as you can and climb the leaderboard.
Sign in with Google or GitHub, then pick a problem.
Each input is bigger than the memory you get, so loading it all and looping over it won't work.
Find the one missing number among 10 million.
Sort a million phone numbers in less memory than the numbers take up.
Multiply two 512 × 512 matrices on a CPU with a 4 KB cache. We score you on simulated CPU cycles (C and C++ only).
Build a spell checker for 200,000 words that fits on a smart fridge.
Scaled-down interview-style system design problems run in seconds. We simulate the outside world by dropping requests and killing your program mid-run.
Sort 200 MB of data with 2 MB of memory.
Find the 10 most visited pages in a log 250 times the size of your memory.
Allow or reject 1 million API requests from 100,000 users. Each user gets 10 requests a second.
Out of 5 million users, email each one with a birthday today, once. The email server takes 1,000 messages a second and drops some.
These targets are for C. Each other language gets its own targets and hard limits that allow for its runtime's overhead. A correct solution over the target is still accepted, as a yellow result.
Pick a problem.
Write your solution in the language you like best.
Submit it. We run it and record its peak memory and run time.
On problems with a leaderboard, compare your score with other players'. Trim your solution and resubmit.
| RANK | PLAYER | MEMORY | LANG |
|---|---|---|---|
| 1ST | NULLPTR | 40 KB | C |
| 2ND | BITFLIP | 58 KB | C |
| 3RD | HEAPSTR | 96 KB | C |
| 4TH | SEGFLT | 131 KB | C |
| 5TH | MALLOCD | 188 KB | C |
| 6TH | OOMKILL | 240 KB | C |
| 7TH | YOU | 300 KB | C |
The lowest memory use wins, so on this example board you'd need under 40 KB to take first place.