Skip to content

Commit ec206e1

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

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
@@ -28,10 +28,10 @@ def kadane(arr: List[int]) -> Tuple[int, List[int]]:
2828
--------
2929
>>> kadane([-2,1,-3,4,-1,2,1,-5,4])
3030
(6, [4, -1, 2, 1])
31-
31+
3232
>>> kadane([1,2,3,4])
3333
(10, [1, 2, 3, 4])
34-
34+
3535
>>> kadane([-1,-2,-3])
3636
(-1, [-1])
3737
"""
@@ -53,10 +53,11 @@ def kadane(arr: List[int]) -> Tuple[int, List[int]]:
5353
start = s
5454
end = i
5555

56-
return max_global, arr[start:end+1]
56+
return max_global, arr[start : end + 1]
5757

5858

5959
# Doctest runner
6060
if __name__ == "__main__":
6161
import doctest
62+
6263
doctest.testmod()

0 commit comments

Comments
 (0)