的款我有個字符爪哇 - 排序只陣列
String a = "badabcde";
char[] chArr = a.toCharArray(); // 'b','a','d','a','b','c','d','e'
什麼是排序僅在陣列的部分最簡單的方法的陣列,給定一個開始和結束索引?
// 'b','a','d','a','b','c','d','e'
subSort(array, startIndex, endIndex);
Ex:
subSort(chArr, 2, 5);
// 'b','a','a','b','c','d','d','e' // sorts indices 2 to 5