Problem Statement | |||||||||||||
| Several players play a game. Each player chooses a certain number, writes it down (in decimal notation, without leading zeroes)
and sorts the digits of the notation in non-decreasing order, obtaining another number.
The player who receives the largest number wins.
You are given a int[] numbers, the list of numbers inilially chosen by the players. Return the winner's resulting number. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | numbers will contain between 2 and 50 elements, inclusive. | ||||||||||||
| - | Each element of numbers will be between 0 and 100000, inclusive. | ||||||||||||
| - | All elements of numbers will be distinct. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||