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

Method getNumLenght

src/java/main/RadixSort.java:37–46  ·  view source on GitHub ↗
(long num)

Source from the content-addressed store, hash-verified

35 }
36
37 protected int getNumLenght(long num) {
38 if (num == 0) {
39 return 1;
40 }
41 int lenght = 0;
42 for (long temp = num; temp != 0; temp /= 10) {
43 lenght++;
44 }
45 return lenght;
46 }
47
48 private int[] radixSort(int[] arr, int maxDigit) {
49 int mod = 10;

Callers 2

getMaxDigitMethod · 0.95

Calls

no outgoing calls

Tested by 1