Reverse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as00111001011110000010100101000000).
Follow up:
If this function is called many times, how would you optimize it?
Related problem: Reverse Integer
{优快云:CODE:635849}

本文介绍了一种方法,用于反转一个给定32位无符号整数的所有位。例如,输入43261596(二进制00000010100101000001111010011100),输出964176192(二进制00111001011110000010100101000000)。此外,讨论了当此函数被频繁调用时的优化方案。
860

被折叠的 条评论
为什么被折叠?



