MCPcopy Index your code
hub / github.com/hustcc/JS-Sorting-Algorithm / sort

Method sort

src/java/main/RadixSort.java:10–17  ·  view source on GitHub ↗
(int[] sourceArray)

Source from the content-addressed store, hash-verified

8public class RadixSort implements IArraySort {
9
10 @Override
11 public int[] sort(int[] sourceArray) throws Exception {
12 // 对 arr 进行拷贝,不改变参数内容
13 int[] arr = Arrays.copyOf(sourceArray, sourceArray.length);
14
15 int maxDigit = getMaxDigit(arr);
16 return radixSort(arr, maxDigit);
17 }
18
19 /**
20 * 获取最高位数

Callers

nothing calls this directly

Calls 2

getMaxDigitMethod · 0.95
radixSortMethod · 0.95

Tested by

no test coverage detected