FastPrepNth Fixed-Format License Plate
Problems/Nth Fixed-Format License Plate

Nth Fixed-Format License Plate

Google logoGoogle● MediumNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report gives a fixed license format of uppercase A-Z letters followed by 0-9 digits, the example AAA000, lexicographic order, and the goal of finding the Nth plate. We chose a variable number of letters and digits, one-based counting, the examples, and the input limits. This is a different problem from the existing Google Nth License Plate task, which shifts character classes across six groups of five characters. Our version is about 91% the same as the reported question.

A license plate contains exactly letterCount uppercase English letters followed by exactly digitCount decimal digits. For example, three letters and three digits produce plates such as AAA000.

Sort every valid plate lexicographically. Given a one-indexed position n, return the plate at that position.

Function

nthFixedFormatLicensePlate(letterCount: int, digitCount: int, n: long) → String

Examples

Example 1

letterCount = 3digitCount = 3n = 1return = "AAA000"

AAA000 is the first plate.

Example 2

letterCount = 3digitCount = 3n = 1001return = "AAB000"

AAA000 through AAA999 occupy the first 1000 positions, so AAB000 is next.

Example 3

letterCount = 1digitCount = 2n = 2600return = "Z99"

This is the final plate for one letter and two digits.

Constraints

  • 1 <= letterCount, digitCount <= 6.
  • 1 <= n <= 26^letterCount * 10^digitCount.

More Google Onsite Interview questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 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
  • 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

Interview reports that mention this question

  • Google PhD New Grad SWE Interview Questions: 1 Experience

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
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public String nthFixedFormatLicensePlate(int letterCount, int digitCount, long n) {
        // write your code here
    }
}
Checking account…