Skip to content

Commit a6f0dd8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7cf4aab commit a6f0dd8

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

bit_manipulation/next_power_of_two.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Utility to compute the next power of two greater than or equal to n.
66
"""
77

8+
89
def next_power_of_two(n: int) -> int:
910
"""
1011
Return the smallest power of two >= n for positive integers.

bit_manipulation/parity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
The parity is 1 when the number of set bits is odd, otherwise 0.
88
"""
99

10+
1011
def parity(number: int) -> int:
1112
"""
1213
Return 1 if `number` has an odd number of set bits, otherwise 0.

bit_manipulation/rotate_bits.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Bit rotation helpers for 32-bit unsigned integers.
66
"""
77

8+
89
def rotate_left32(x: int, k: int) -> int:
910
"""
1011
Rotate the lower 32 bits of x left by k and return result in 0..2**32-1.

0 commit comments

Comments
 (0)