Reverse Bits — Easy Coding Interview Question
Reverse bits of a given 32-bits unsigned integer.
Example
Input: n = 43261596
Output: 964176192
Constraints
- Input must be a 32-bit unsigned integer
Topics & Companies
Topics: bit-manipulation
Asked by: Apple, Google
Optimal Solution Complexity
Time complexity: O(32). Space complexity: O(1).
Practice more