Pandigital Minimum Difference
The two 5-digit numbers: 71482 and 30956, are called pandigital, because between them they use all the digits from 0 to 9; their difference is 40526.
What is the minimum difference between two 5-digit pandigitals?
The challenge is to make the bigger of the two numbers as close as possible above some multiple of ten thousand and the smaller just below. For example, 20345 and 19876 are just above and below 20000; their difference being 469.
With a little thought, it can be seen that the minimum difference is achieved with 50123 49876 = 247.
What about the minimum difference between two 4-digit pandigitals (using the digits 0 to 7)?
What is the greatest sum of two 5-digit pandigitals?