Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6387b22

Browse files
authored
Update 190-Reverse-Bits.py
1 parent fd08e46 commit 6387b22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/190-Reverse-Bits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ def reverseBits(self, n: int) -> int:
33
res = 0
44
for i in range(32):
55
bit = (n >> i) & 1
6-
res = res | (bit << (31 - i))
6+
res += (bit << (31 - i))
77
return res

0 commit comments

Comments
 (0)