Math New Drill : Level 1 SNJ00-0705-L1 Difference of two 5 digit figures

Two 5 digit integers are made by 10 numbers of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 used once respectively. 
When the difference between these two figures is smallest, find the difference.




Answer
247

Solution
The number below ten thousand digit of bigger figure should be as small as possible. 
That's 0123. 
The number below ten thousand digit of smaller figure should be as large as possible. 
That's 9876. 
Therefore two figures are 50123 and 49876 and the difference is 50123 - 49876 = 247.