FastPrepNth License Plate
Problems/Nth License Plate

Nth License Plate

Google logoGoogle● MediumINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report gives the five-character pattern and a sample rank. It does not give a closed formula for each group or the valid range. Our sequence is about 95% the same as the reported pattern.

License plates are five-character strings arranged in six consecutive groups. In group L, where 0 <= L <= 5, a plate has 5 - L leading decimal digits followed by L uppercase English letters.

Within a group, the numeric part varies fastest from all zeroes to all nines. The letter suffix then advances in ordinary base-26 order from all A characters to all Z characters. For example, the sequence starts with 00000 through 99999, then 0000A through 9999A, then 0000B, and eventually ends at ZZZZZ.

Given the one-indexed position n, return the corresponding license plate.

Function

nthLicensePlate(n: int) → String

Examples

Example 1

n = 3return = "00002"

The first three plates are 00000, 00001, and 00002.

Example 2

n = 100001return = "0000A"

The first 100000 positions contain five digits, so the next plate begins the one-letter group.

Constraints

  • 1 <= n <= 19244736

More Google Onsite Interview questions

  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Calculate a Token-List ExpressionCollege Vine · ONSITE INTERVIEW
  • Iterate Canonical IPv6 AddressesOpenAI · ONSITE INTERVIEWOpenAI interview questions
  • Parse a Signed Integer in Any BaseMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Bit at an Index After Repeated Binary ExpansionAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Text Embedding and Vector SearchNike, Inc. · PHONE SCREEN · ONSITE INTERVIEWNike, Inc. interview questions
  • Fraction to Recurring DecimalGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Rank Bipedal Dinosaurs by SpeedMeta · PHONE SCREEN · ONSITE INTERVIEWMeta interview questions
  • Every Result of Grouping an ExpressionC3.ai · ONSITE INTERVIEWC3.ai interview questions
  • Largest Minus Smallest Value of a Parenthesized ExpressionNutanix · ONSITE INTERVIEWNutanix interview questions
  • String to Integer with ClampingAMD · ONSITE INTERVIEWAMD interview questions

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
  • Google Experienced SWE First Round and Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public String nthLicensePlate(int n) {
        // write your code here
    }
}
Checking account…