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 d0d3502 commit ce6f875Copy full SHA for ce6f875
reverse-bits/printjin-gmailcom.py
@@ -0,0 +1,7 @@
1
+class Solution:
2
+ def reverseBits(self, n):
3
+ result = 0
4
+ for _ in range(32):
5
+ result = (result << 1) | (n & 1)
6
+ n >>= 1
7
+ return result
0 commit comments