Skip to content

Commit 64ea4bf

Browse files
authored
Update maximum-number-of-potholes-that-can-be-fixed.py
1 parent 7f9d32f commit 64ea4bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/maximum-number-of-potholes-that-can-be-fixed.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def inplace_counting_sort(nums, reverse=False): # Time: O(n)
3939
result = 0
4040
for l in reversed(ls):
4141
c = min(l+1, budget)
42-
if c <= 1:
42+
if c-1 <= 0:
4343
break
4444
result += c-1
4545
budget -= c
@@ -68,7 +68,7 @@ def maxPotholes(self, road, budget):
6868
result = 0
6969
for l in reversed(ls):
7070
c = min(l+1, budget)
71-
if c <= 1:
71+
if c-1 <= 0:
7272
break
7373
result += c-1
7474
budget -= c

0 commit comments

Comments
 (0)