Distinguish yourself
in the AI era.
Are you prepared for your future?
Core Catalog
Companies don't just filter on LeetCode anymore. Practice real implementation-style problems: systems, debugging, APIs, concurrency, and codebase tasks from real interviews.
I'm single.
Implement the class SPSCQueue, which is a lock-free single-producer single-consumer queue.
SPSCQueue(capacity)capacityspecifies the maximum amount of elements that may exist in the queue at any time.capacitymust be a power of 2 and greater than 2. Throw an exception if it isn't.
push(element)Attempts to enqueue
element.Returns
trueif the enqueue succeeds.Returns
falseif the queue is full at the operation's linearization point (no spurious failures).
pop(out)Attempts to dequeue an element and store it in
out.Returns
trueif the dequeue succeeds.Returns
falseif the queue is empty at the operation’s linearization point (no spurious failures).
Exactly one producer thread and exactly one consumer thread may call
push/popconcurrently.The implementation must be lock-free (no
std::mutex, no condition variables, etc.). Using a lock may result in a compilation error.The grader uses stress tests to detect corruption (duplicates/missing) and deadlocks, but does not formally verify linearizability.
Type constraints (standard version):
- You may assume the stored type
Tis default-constructible.
- You may assume the stored type
You may assume the queue will not be destroyed during concurrent
pushorpopoperations.You do not need to write any input/output parsing.
A queue constructed with
capacity = Nmust allowNsuccessfulpushcalls before reporting full.Because there are only two threads, there is very little opportunity for data corruption, allowing incorrect solutions to pass the judge. Therefore, this problem has been marked as unrated.
No sample test cases for this problem.
A roadmap that motivates problem solving
Handpicked by Codeforces Masters+ and ICPC/IOI participants from quant and FAANG+ companies. A focused alternative to NeetCode, TLE, and A2Z, with problems that teach you to derive solutions from first principles.
WhiteBox users have received offers from








More than a problem bank
The problems are just the start. The rest is what actually gets you the offer.
An adaptive AI coach that remembers you.
Set a goal three months out and it builds the plan. Every session goes into memory: what you solved, what you keep getting wrong, where your level actually sits. Come back in a week and it already knows.
See White RoomGain alpha on how to get good.
Most advice on getting good is a playbook for how interviews worked in 2021, or an influencer selling a shortcut. Our guides teach you how to learn efficiently, so every hour you put in builds habits that still work in 2026.
Read the guidesGrow inside our community.
An environment shapes the outcome of your growth. People waste time on wrong resources, editorials written by beginners, and unqualified influencers. Join candidates who have been through FAANG+, quant, and elite startup interviews so your habits, resources, and feedback all point toward the offer.
Join our DiscordInterview intel you can actually solve.
Send us your latest interview round, and we'll turn quality reports into runnable WhiteBox problems.
Know your limits. (Easy version)
This is the easy version of RateLimiter. The only difference between this and the hard version are the constraints. Solving one problem does not guarantee solving the other.
Implement RateLimiter, which tracks a bounded number of events in a rolling time window.
RateLimiter(seconds, capacity)secondsdefines the length of the rolling time window.capacityis the maximum number of events that may exist within the window at any moment.At all times, the RateLimiter should only account for events whose timestamps fall within the most recent
seconds
add(count, timestamp)Adds
countnew events occurring at timetimestamp.If adding all
countevents would cause the total number of active events in the window to exceedcapacity, only add as many as possible and discard the remainder.All events added by a single call to
addare considered to occur at the same instant.You may assume calls to
addare made with non-decreasing timestamps.Calls to
addshould not return anything.
check()- Returns the number of events currently within the active time window.
Events expire automatically once they fall outside the time window.
The implementation should correctly handle multiple additions at the same timestamp.
How you store events internally is up to you.
Built on how people actually learn.
You get good at solving problems by solving them, even when reading solutions feels more productive. Here’s what the studies found, and where it shows up in WhiteBox.
Passive learning feels better. Active learning works better.
Most people watch the video solution, feel like they learned it, and make very little progress. The lecture students in this study fell for the same thing: they felt they learned more and scored lower.
Active doesn’t mean struggling alone. Asking Tsuki, the AI chat on every plan, for the minimal hint to unblock yourself instead of the answer is scaffolding in Lev Vygotsky’s Zone of Proximal Development: just enough support to solve a problem slightly beyond what you can do alone.
Read: Is NeetCode / Strivers A2Z bad?Active class versus a passive lecture
Get stuck before you read the editorial. You’ll understand it better.
You’ve probably been told to open the editorial after 20 to 30 minutes. An editorial is not a timer, and struggling is not wasted time: exhausting your own ideas is what builds the reasoning.
The Core Catalog trains synthesis instead of recall. A problem combines several ideas instead of dressing up one pattern, so you can’t finish it by matching it against something you memorized. We are not training you to be a lookup table, we are training you to produce the insight yourself.
Read: Is pattern matching a trap?Understanding of the concept, out of 10
You can’t memorize your way through a follow-up question.
The usual mistake is studying one topic at a time. You always know which technique the problem wants, so you never face unseen problems, which are exactly what an interview gives you. Students told the formula first kept up on ordinary word problems and fell behind on one that looked new.
Daily quests pay XP for solving a problem at your level on CSES, AtCoder, Codeforces or LeetCode, a different one each day, and White Room DSA deals problems you haven’t seen. Both hand you the problem and nothing else. We don’t spoil which technique it wants.
Read: Meta-learning, and what Chinese OI gets right about learning algorithmsScore on a new kind of problem, three weeks later
These studies tested ways of learning. None of them tested WhiteBox.
Choose your WhiteBox plan.
Take DSA Premium for the practice loop and unlimited resume reviews, or Ultra Premium for the whole prep system with the coach. Open any plan to see the screens you are buying.
Free
Everything WhiteBox has to offer for free.
- 48 original implementation problems in the Core Catalog
- 912 curated DSA problems in the algorithm roadmaps
- 1,900+ quiz questions across algorithms and domain knowledge
- Algorithm roadmaps that map out what to learn next
- Interview intel from real candidates, free forever
- Daily quests, streaks, and the global leaderboard
- Tsuki AI chat for hints and explanations
- 36 in-depth guides and writeups, always free
- Progress that persists across every session
DSA Premium
Billed annually at $79. Save 27%.
One lunch to get the full DSA improvement loop.
- Everything in Free
- Adaptive DSA practice: a hand of unseen problems picked for your level
- Problems pulled from AtCoder, CSES, Codeforces, LeetCode, USACO, and oj.uz
- Solve history, rolling difficulty, and per-topic weak spots
- A weekly check-in that re-aims the next block of practice
- A shared learner profile with inspectable practice evidence
- Judge sync, so solves you make elsewhere still count
- Unlimited AI resume reviews
Ultra Premium
Most popularBilled annually at $167. Save 27%.
0.1% of your future salary.
- Everything in DSA Premium
- White Room: an AI coach that plans your whole prep around your goal
- A roadmap the coach rewrites as you go
- Memory that persists across sessions and brings back your weak spots
- DSA AI coaching and weekly check-ins with shared learner memory
- Exclusive interview problems from our community members
- A private Discord channel (on request)
- An Ultra Premium badge and card frame to show it off
Outside the US? Reach out on Discord for regional pricing.