### Theory:

Shifting digits of a number is nothing but the exchanging the digits to another place.
Example:
Take a number $$358$$.

The condition here is to exchange its hundreds and unit digit and form the new number.

That is, exchange $$3$$ to $$8$$ and $$8$$ to $$3$$.

Here comes a question.
Which is greater and which is least among the numbers?

To find that express the numbers formed in both ascending and descending order.

The number before shifting is $$358$$. Exchanging the hundreds and the units digits, the number after shifting is $$853$$.
That is, if we exchange the hundreds and unit digit, the resultant number becomes greater.