Search
⌘K

Leetcode 47. Permutations II

Generate all distinct permutations of an array that may contain duplicate values. The core challenge is to exhaustively build permutations while avoiding duplicate results (commonly handled by pruning duplicates via sorting or using frequency counts), with n ≤ 8.

Asked at:

Microsoft

Microsoft


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early April, 2026

Microsoft

Microsoft

Mid-level

This and a few follow ups with dependencies

Your account is free and you can post anonymously if you choose.