Note: If you think about this problem, it's a big mistake to compare elements.
Of course, this algorithm is not optimal, it does not represent universality. But can be extended, the overall or this idea, is nothing more than "fill in the blanks" operation
Public classOrderlink {/*** An array of 65,535 numbers that do not duplicate integers greater than 0 (that is, all the non-repeating integers in the 0~~65535, the order is disorganized), * the fastest way to sort * @param args*/ Public Static voidMain (string[] args) {//For example, an array with 65,535 numbers that do not repeat an integer greater than 0 int[] Prel =New int[]{2,4,9,5,3,6,7,8, One,1, A,0,Ten}; int[] Endl =Oderbysel (Prel); for(intI:endl) {System. out. print (i +"<"); } } //Sorting Methods Private Static int[] Oderbysel (int[]inch){ int[] Inl =New int[inch. length]; for(intI=0;i<inch. length;i++) {inl[(int)inch[i]] =inch[i]; } returnINL; }}
An array with 65,535 numbers that do not duplicate integers greater than 0 (that is, all the non-repeating integers in the 0~~65535, the order is disorganized), sorted in the quickest way