Problem Statement | |||||||||||||
| It is easy to sort an array of integers, but more difficult to sort the digits within an integer. You are given an int x. Sort the digits in x in non-ascending order, and return the resulting int. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | x will be between 1 and 1000000000, inclusive. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||