FunctionRacerProblemsRace

Distinct Digit Arrangements

EasyMathPython, JavaScript, TypeScript, Java, C++

Given a list of digits, some possibly repeated, return how many different sequences you can make by rearranging all of them. Leading zeros are allowed, and identical digits are not told apart.

Example 1

digits [1,1,2]
returns 3

112, 121, 211.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Math problems