uint32_t reverseBits(uint32_t n) {
uint32_t m = 0, i=0;
uint8_t *bf = (uint8_t *)&m;
while(i<32){
m |= (n&0x1);
if(i<31)
m <<= 1;
n = n >> 1;
i++;
}
return m;
}
leetcode-190. 颠倒二进制位-C语言
最新推荐文章于 2021-11-13 18:02:30 发布