摘要: 1.剑指 Offer 15. 二进制中 1 的个数 与1同位与判断最低位是否是1,判断完右移继续判断下一个 1 class Solution { 2 public: 3 int hammingWeight(uint32_t n) { 4 int cnt = 0; 5 while(n){ 6 if(n 阅读全文
posted @ 2022-07-17 10:30 balabalahhh 阅读(27) 评论(0) 推荐(0)