Skip to content

Commit d8d5ae1

Browse files
authored
Update Koko Eating Bananas - Leetcode 875.py
1 parent 6a4c651 commit d8d5ae1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Koko Eating Bananas - Leetcode 875.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def k_works(k):
99
return hours <= h
1010

1111
l = 1
12-
r = max(piles)
12+
r = max(piles) # m
1313

1414
while l < r:
1515
k = (l + r) // 2
@@ -20,3 +20,6 @@ def k_works(k):
2020
l = k + 1
2121

2222
return r
23+
24+
# Time Complexity: O(n * log(m))
25+
# Space Complexity: O(1)

0 commit comments

Comments
 (0)