data-structure icon indicating copy to clipboard operation
data-structure copied to clipboard

基于java语言的数据结构及算法实现,LeetCode算法示例

Results 4 data-structure issues
Sort by recently updated
recently updated
newest added

public static String toString(int n, int radix) { String str = ""; while (n > 0) { int k = n % radix; str = (char) (k

计算子串长度是 end-begin,而不是 begin-end char[] buffer = new char[end - begin];

复制 str 时应该是 buffer[i + j] = str.value[j]; 而不是 buffer[j] = str.value[j]; j 从 0 开始,这样会导致原来的字符串被覆盖了