← Microsoft questions

Count unique permutations of digits without leading zeros

Filed under Microsoft

Given an array of digits nums (which may contain duplicates and zeros), return the number of distinct permutations of the array that do not start with 0. Two permutations are the same if they have…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.