Question bank › Backtracking
Dsa Backtracking Medium

Unique Permutations of Strings

You are tasked with generating all unique permutations of a given string where characters may repeat. Each permutation should be presented in lexicographical order. The input format is: Input: A single line containing the string. Output: Each unique permutation on a new line, in lexicographical order. Example: Input: AAB Output: AAB ABA BAA

Key concepts

backtrackingpermutationsstrings

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 Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.