MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / bits

Method bits

src/class028/Code01_RadixSort.java:75–82  ·  view source on GitHub ↗
(int number)

Source from the content-addressed store, hash-verified

73
74 // 返回number在BASE进制下有几位
75 public static int bits(int number) {
76 int ans = 0;
77 while (number > 0) {
78 ans++;
79 number /= BASE;
80 }
81 return ans;
82 }
83
84 // 基数排序核心代码
85 // arr内要保证没有负数

Callers 1

sortMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected