Question 398010
Largest # is 6543, Largest # with repeated digits is 6666
Smallest # is 2034, smallest # with repeated digits is 2000


Note that the first digit cannot be zero. The basic algorithm is to place the largest digits first to obtain the largest number, vice versa for the smallest number.