Reported May 2026
Capital Onequeue

Queue Check-in Simulation with Capacity Limit

Reported by candidates from Capital One's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Capital One OA. Under 2s to a working solution.
Founder's read

Capital One's May 2026 OA includes a queue simulation problem that trips up candidates who overthink the state management. You're given arrival times and must track when each person starts service, accounting for a hard capacity limit of 10 people in the system at once. Anyone who arrives when the queue plus person being served exceeds 10 gets turned away and returns null. It's a queue problem, but the real work is tracking the front-of-line service time correctly as people drop out. StealthCoder can feed you the pattern in real time if you blank on the state transitions.

The problem

Complete the function below. The function receives the full standard input as a single string and must return the exact standard output lines for the described problem. Original prompt Problem There is a single check-in line. You are given an integer array arrivalTimes where arrivalTimes[i] is the time when person i arrives at the end of the line. Rules: Only one person is processed at a time. The person at the front takes 30 seconds to check in. When a person arrives, if the number of people currently waiting/being served in the system is greater than 10, that person leaves immediately and will not check in. Return an array result: If person i is served, result[i] is the time they start service. Otherwise, result[i] = null. Assume arrivalTimes is non-decreasing; ties are enqueued in input order. Input Integer array arrivalTimes Output Array result (each entry is an integer or null) Constraints (suggested) 1 <= len(arrivalTimes) <= 2e5 0 <= arrivalTimes[i] <= 1e9 Examples arrival=[0,0,0] → result=[0,30,60] arrival=[0,10,20] → result=[0,30,60] arrival=[0,100] → result=[0,100] 12 people arrive at time 0 → first 11 served, 12th leaves arrival=[0,15,15,16] → result=[0,30,60,90] Function Description Complete solveOneQueueCheckInSimulation. It has one parameter, String input, containing the full stdin payload. Return the stdout payload as an array of lines, without trailing newline characters. The returned string must match the expected standard output for the sample input. Use the limits and requirements stated in the prompt.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trap here is forgetting that service time is absolute, not relative. Person at the front always takes exactly 30 seconds from when they start, so if person 1 starts at time 0, they finish at 30, and person 2 starts at 30 regardless of when they arrived. You need to maintain the current queue size and the time the front person finishes. When a new person arrives, check if queue size plus 1 exceeds 10 before adding them. If they fit, their start time is max(arrival time, finish time of current person). Use a simple queue data structure (not a priority queue). Track both when the front person finishes and the count of waiting people. Simulate person by person in arrival order. The capacity check happens on arrival, not at service time. StealthCoder handles edge cases like ties and gaps in arrival times where the queue empties.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Queue Check-in Simulation with Capacity Limit cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Capital One's OA.

Capital One reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Queue Check-in Simulation with Capacity Limit FAQ

What does 'greater than 10' mean exactly?+

If 10 people are already in the system (waiting or being served), and someone new arrives, that would make 11, so they're rejected. The limit is 10 total in the system at any moment, including the person currently at the window.

Does the 30-second service time start fresh or does it stack?+

It stacks. Person 1 starts at time 0, finishes at 30. Person 2 starts at 30, finishes at 60. You're tracking the cumulative finish time of whoever is currently at the front of the queue.

What if two people arrive at the same time?+

They're enqueued in input order. The first one in the array starts service when the previous person finishes. The second one starts 30 seconds after that, assuming both fit under the capacity limit.

Can the queue ever go empty between arrivals?+

Yes. If person A finishes at time 100 but person B doesn't arrive until time 200, the queue sits empty. Person B starts at 200, not 100 plus 30. Use max(arrival time, current finish time).

How do I test my code before the OA?+

Walk through the given examples by hand, tracking queue size at each arrival and the finish time of the current person. Verify that the 12-person-at-time-0 example rejects exactly the 12th person. That's the edge case that reveals the capacity logic.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Capital One.

OA at Capital One?
Invisible during screen share
Get it