How to form largest and smallest numbers using 4 digits.