Given a 32-bit unsigned integer, return the integer obtained by reversing the order of its bits.
n = 00000010100101000001111010011100964176192 (00111001011110000010100101000000)Solve it in the editor. Sign in free to run your Python or JavaScript against test cases, get a verdict, and track your attempts.
Solve on FeatCode →Work directly on a number's binary representation using bitwise operators — often turning an O(n) or O(log n) problem into a handful of O(1) operations.
Read the full Bit Manipulation guide →
Original problem on LeetCode ↗