(int[] sourceArray)
| 8 | private static final InsertSort insertSort = new InsertSort(); |
| 9 | |
| 10 | @Override |
| 11 | public int[] sort(int[] sourceArray) throws Exception { |
| 12 | // 对 arr 进行拷贝,不改变参数内容 |
| 13 | int[] arr = Arrays.copyOf(sourceArray, sourceArray.length); |
| 14 | |
| 15 | return bucketSort(arr, 5); |
| 16 | } |
| 17 | |
| 18 | private int[] bucketSort(int[] arr, int bucketSize) throws Exception { |
| 19 | if (arr.length == 0) { |
nothing calls this directly
no test coverage detected