Largest possible number is in reverse order.
Example, given 2395, the largest number is 9532.
If three is in the hundreds place, we have 4,7 and 8 to fill in X3XX, so
8374 is the largest possible number that satisfy given requirements.
5.9m questions
7.8m answers