Number shuffle

Note: This problem needs knowledge of topics you haven't covered yet. Reading List

Problem Statement

Given a 3 or 4 digit number with distinct digits, return a sorted array of all the unique numbers that can be formed with those digits.

Given: 123
Return: [123, 132, 213, 231, 312, 321]


Array#uniq removes duplicates from an array.
Array#shuffle shuffles the elements in an array.
Number of combinations for number with n-digits is factorial of n

Output Window

Reading list for this problem

You are yet to work on:

Congratulations, guest!

% of the book completed