To find the greatest 4-digit number with the given digits, we arrange the digits in descending order.
And, to find the smallest 4-digit number with the given digits, we arrange the digits in ascending order.
ThousandsHundredsTensOnes36899863
Since 3<6<8<9 or 9>8>6>3, the smallest and largest numbers with the given digits are 3689 and 9863 respectively.
The difference between these two numbers is 9863 - 3869 = 6174.