Skip to content

Commit 02fa433

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 944c5f9 commit 02fa433

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dynamic_programming/kadane_algorithm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ def kadane(arr):
2626
--------
2727
>>> kadane([-2,1,-3,4,-1,2,1,-5,4])
2828
(6, [4, -1, 2, 1])
29-
29+
3030
>>> kadane([1,2,3,4])
3131
(10, [1, 2, 3, 4])
32-
32+
3333
>>> kadane([-1,-2,-3])
3434
(-1, [-1])
3535
"""
@@ -51,10 +51,11 @@ def kadane(arr):
5151
start = s
5252
end = i
5353

54-
return max_global, arr[start:end+1]
54+
return max_global, arr[start : end + 1]
5555

5656

5757
# Doctest runner
5858
if __name__ == "__main__":
5959
import doctest
60+
6061
doctest.testmod()

0 commit comments

Comments
 (0)