Problem
Hints
Solutions
Submissions
Reverse Bits
Reverse the bits of a given 32-bit unsigned integer.
Constraints
The input must be a binary string of length 32
View editorial solution
Back
Python 3.8
Saving… · 2 lines
9
1
2
›
⌄
class
Solution
:
def
reverseBits
(
self
,
n
:
int
)
->
int
:
Console
Run
Submit
Click Run to execute sample tests.