摘要: 位1的个数 解法一: class Solution { // you need to treat n as an unsigned value public int hammingWeight(int n) { return Integer.bitCount(n); } } 解法二: 记住一点,前面 阅读全文
posted @ 2019-02-24 19:33 GavinYGM 阅读(94) 评论(0) 推荐(0) 编辑