Two 5-digit positive integers are formed using each of the digits from 0 through 9 once. What is the smallest possible positive difference between the two integers?
(A) 469
(B) 269
(C) 247
(D) 229
(E) 249
If the ten thousands digits of the two numbers differ by more than 1 , then the two numbers will differ by more than 10000 . (For example, a number of the form $5 x x x x$ is at least 50000 and a number of the form $3 x x x x$ is less than 40000 so these numbers differ by more than 10000 .) Since all of the given answers are less than 1000 and since the two ten thousands digits cannot be equal, then the ten thousands digits must differ by 1 . We will determine the exact ten thousands digits later, so we let the smaller of the two ten thousands digits be $d$ and the larger be $D$.

To make the difference between $D x x x x$ and $d x x x x$ as small as possible, we try to simultaneously make $D x x x x$ as close to $D 0000$ as possible and $d x x x x$ as close to $d 9999$ as possible while using all different digits.

In other words, we try to make $D x x x x$ as small as possible and $d x x x x$ as large as possible while using all different digits.

To make $D x x x x$ as small as possible, we use the smallest possible digits in the places with the highest value.

Since all of the digits must be different, then the minimum possible value of $D x x x x$ is $D 0123$. To make $d x x x x$ as large as possible, we use the largest possible digits in the places with the highest value.

Since all of the digits must be different, then the maximum possible value of $d x x x x$ is $d 9876$. Since we have made Dx $x x x$ as small as possible and $d x x x x$ as large as possible and used completely different sets of digits, then doing these two things will make their difference as small as possible, assuming that there are digits remaining to assign to $D$ and $d$ that differ by 1 .

The digits that have not been used are 5 and 4 ; thus, we set $D=5$ and $d=4$.

This gives numbers 50123 and 49876 .

Their difference is $50123-49876=247$, which is the minimum possible difference.

Answer: (C)