Combined with Huawei's machine questions to show
Obviously want to ask some students in school to do a questionnaire survey, in order to the objectivity of the experiment, he first used a computer to generate N 1 to 1000 random integer (n≤1000), for the repeated numbers, only one, the rest of the same number is removed, the different numbers correspond to different student's number. Then the numbers from small to large sorting, in line with the order to find students to do the investigation. Please help clearly to complete the "go to Heavy" and "sort" work.
Input Param
N Enter the number of random numbers
Inputarray an array of n random integers
Return Value
Outputarray random integer after output processing
Note: The test case guarantees the correctness of the input parameters and the answer does not need to be verified. There are more than one set of test cases.
Input Description:
Enter multiple lines, first enter the number of random integers, and then enter the corresponding number of integers
Output Description:
Returns multiple rows, processed results
Input Example:
11102040326740208930040015
Output Example:
10152032406789300400
The code is as follows
Attention:
1. Test cases more than one group is a big hole
It means that multiple test cases are entered at one time, so there must be while (In.hasnext ())
Otherwise, the pass rate is 0.
2, TreeSet in the type if integer, you can not use int
Huawei Machine Test Java implementation de-re-ordering with TreeSet