Reported September 2026
Googlemath

Nth Staged License Plate

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

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

Google flagged this one in September 2026, and it looks scarier than it is. Nth Staged License Plate is a number-system conversion problem in a costume. You skip through stages by subtracting block sizes, then decode the leftover index into letters and digits. If you're taking the OA in the next day or two, learn the shape of it now. And if your mind goes blank mid-assessment, StealthCoder runs invisibly as a safety net while you work through it.

The problem

License plates are generated in stages for a fixed total length length. Stage k has exactly k leading uppercase letters followed by length - k digits. Stages run from k = 0 through k = length.
Within one stage, enumerate the letter prefix as a zero-padded base-26 number with A = 0, then enumerate the digit suffix as a zero-padded base-10 number. The index n is zero-based across the concatenation of all stages. Return the plate at index n.

Function
nthStagedLicensePlate(n: long, length: int) → String

Examples
Example 1
n = 0
length = 5
return = "00000"
The first stage starts with the all-zero five-digit plate.
Example 2
n = 99999
length = 5
return = "99999"
This is the last all-digit plate.
Example 3
n = 100000
length = 5
return = "A0000"
After 100000 digit-only plates, the one-letter stage begins.
Example 4
n = 360
length = 2
return = "AA"
Length two has 100 digit plates and 260 one-letter plates before the all-letter stage.

Constraints
1 <= length <= 10.
0 <= n < sum(26^k * 10^(length-k)) for 0 <= k <= length.
All intermediate counts fit in a signed 64-bit integer.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick: stage k holds 26^k * 10^(length-k) plates. Start at k = 0 and while n is at least that count, subtract it and move to the next stage. Once n is smaller than the stage size, you're inside the right stage. The offset n then splits mixed-radix style. The digit suffix is n % 10^(length-k), and the letter prefix is n / 10^(length-k). Convert the prefix to base 26 with A = 0, padded to k letters. Convert the suffix to base 10, padded to length-k digits. Pitfalls: forgetting zero padding, computing powers with floats, and getting the order wrong (letters first, then digits). Check Example 4: length 2, n = 360. Stage 0 has 100 and stage 1 has 260, leaving offset 0 in stage 2, which gives AA. Everything fits in 64-bit, so no big integers are needed. Time is O(length).

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 Nth Staged License Plate 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 Google's OA.

Google 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.

Nth Staged License Plate FAQ

What's the trick to Nth Staged License Plate?+

Treat it as a mixed-radix conversion. Subtract each stage's size (26^k * 10^(length-k)) from n until n falls inside a stage. Then split the offset into a letter prefix and digit suffix using division and modulo by 10^(length-k). Convert each part with its own base and pad.

How hard is this problem really?+

Easy to medium. There's no fancy data structure. The difficulty is off-by-one errors and padding. If you can convert a number to base 26 and base 10 with fixed width, you can solve it. Expect about 20 lines of code.

What are the common bugs?+

Forgetting to pad with leading A's or zeros, swapping the prefix and suffix order, and using floating point pow. Also watch the k = 0 stage (all digits) and the k = length stage (all letters), where one of the two parts is empty.

Do I need to worry about overflow?+

The constraints say all intermediate counts fit in a signed 64-bit integer. Use long in Java or C++, and Python is fine as is. Compute powers with integer multiplication, not a float pow call, to avoid precision errors.

How do I prepare for this in 48 hours?+

Write the stage-skipping loop and the two converters by hand. Test with the four examples, especially n = 100000 and n = 360 with length 2. Then try small lengths like 1 and 2 and brute-force check against a generator to confirm your indexing.

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

OA at Google?
Invisible during screen share
Get it