Skip to content

Commit d917069

Browse files
committed
Fix issues and improve divide_two_integers algorithm
1 parent ecf36e2 commit d917069

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bit_manipulation/divide_two_integers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def divide(self, dividend: int, divisor: int) -> int:
4747
while d >= n:
4848
cnt = 0
4949

50-
# Inner loop: find largest power-of-two multiple of divisor that fits in dividend
50+
# Inner loop: find largest power-of-two multiple of divisor
51+
# that fits in dividend
5152
while d >= (n << (cnt + 1)):
5253
cnt += 1
5354

0 commit comments

Comments
 (0)