class Solution {
public:
    uint32_t reverseBits(uint32_t n) {
        uint32_t res = 0;
        for (int i = 0; i < 32; ++i) {
            res=(res<<1)|(0x1&(n>>i));
        }
        return res;
    }
};

相关文章:

  • 2022-12-23
  • 2021-11-28
  • 2021-09-16
  • 2022-03-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2021-12-28
猜你喜欢
  • 2022-02-05
  • 2022-01-01
  • 2021-06-24
  • 2021-12-11
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案