java中倒序用的函数是哪个?

java中倒序用的函数是哪个


一只名叫tom的猫
浏览 1009回答 2
2回答

跃然一笑

倒序没有。只要升序的SORT;例如:public static Long[]&nbsp;sort(Long[] x){for (int i = 1; i < x.length; i++){ for (int j = i; j > 0; j--){ if (x[j] > x[j - 1]){ Long temp = x[j];x[j] = x [j - 1];x[j - 1] = temp;}}} return x;}}
打开App,查看更多内容
随时随地看视频慕课网APP