We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7f9333 commit 8fb92b4Copy full SHA for 8fb92b4
190-Reverse-Bits.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def reverseBits(self, n: int) -> int:
3
+ res = 0
4
+ for i in range(32):
5
+ bit = (n >> i) & 1
6
+ res = res | (bit << (31 - i))
7
+ return res
0 commit comments