Question bank › Backtracking
Dsa Backtracking Easy

License Plate Generation

You are tasked with generating unique license plates of a specified format. A license plate consists of two letters followed by three digits. Given a set of two letters and three digits, output all unique combinations in alphabetical and numerical order. Input Format: - The first line contains two uppercase letters, separated by space. - The second line contains three digits, separated by space. Output Format: - Print each unique license plate in a new line. Example: Input: A B 1 2 3 Output: A1B23 A1B32 A2B13 A2B31 A3B12 A3B21 B1A23 B1A32 B2A13 B2A31 B3A12 B3A21

Key concepts

backtrackingstring manipulationgeneration

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.