easyBit ManipulationDivide And Conquer 0 views
Reverse Bits
Reverse bits of a given 32 bits unsigned integer.
Reverse bits of a given 32 bits unsigned integer.
Note:
Follow up: If this function is called many times, how would you optimize it?
Example 1
Input: n = 43261596
Output: 964176192
Example 2
Input: n = 2147483644
Output: 1073741822
Constraints
- 0 <= n <= 231 - 2
- n is even.
Follow-up
If this function is called many times, how would you optimize it?
Hints
No hints yet.
Companies
No companies reported yet.
Discussion
Sign in to join the discussion.
Loading discussion...
Test results
No test cases yet.