摘要:
题目: 思路: 指针位移,一次比较一列 (一)代码 class Solution { public String longestCommonPrefix(String[] strs) { String res = ""; int compareTimes = Integer.MAX_VALUE; f 阅读全文
摘要:
题目: 思路: 1 Brian Kernighan算法 x &= (x - 1) 每次可以从最右边擦除一个二进数 1 2 动态规划 (一)代码 Brian Kernighan算法 class Solution { public int[] countBits(int n) { //位运算 算法 x 阅读全文