Skip to content
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 2, 2023
commit 1a9683e8cd1436f8192f0a25cdba6ef81bf8e32f
6 changes: 3 additions & 3 deletions bit_manipulation/power_of_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def power_of_4(number: int) -> bool:
if number & (number - 1) == 0:
c = 0
while number:
c+=1
number>>=1
if c%2:
c += 1
number >>= 1
if c % 2:
return True
else:
return False
Expand Down