Answers:
Largest possible = 9776410
Smallest possible = 1046779
====================================================
Explanation:
To make the greatest 7-digit number, we start with the largest digit at the left-most end. So we start with 9. Then the next digit is the next largest, which is 7, and so on until we get
9776410
If we swap any two distinct digits, then we'll get something smaller than that value above. For instance, swap the 1 and 0 which leads to 9776401 and this is smaller than 9776410. This is simply because 01 is smaller than 10. Every other digit is kept the same. Try out other digit swaps to see that the result is smaller than the value in bold.
------------------------
To make the smallest 7-digit number, we just take the idea mentioned in the first section and we reverse it. We start with the smallest digit. We can't have 0 as the first value or else it won't be a 7-digit number. So we go for 1 instead. Then we can pick 0 next. For the third digit we pick the third smallest (the digit 4), and we build up to get
1046779
If we swap any distinct two digits, then we'll get something larger than this value. Let's say we swap the second 7 and the 9 at the end. We go from 79 at the end to 97. Since 79 < 97, this means 1046779 < 1046797. That's one example of many.
--------------------------
So in short, the largest number possible has all the largest digits to the left (and we decrease going left to right). The smallest number possible is the reverse of this having the smallest digits to the left (then increasing from left to right). The 0 cannot be at the left-most digit position, or else won't have a seven digit number.