All Articles

Given N, find the smallest number with the same digits

Write a method that, given an original number N, returns the smallest number with the same number of digits.