We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa5b8e commit 65730beCopy full SHA for 65730be
1 file changed
dynamic_programming/kadanes_algorithm.py
@@ -4,8 +4,9 @@
4
5
Example:
6
[-2, 1, -3, 4, -1, 2, 1, -5, 4] --> 6 (subarray [4, -1, 2, 1])
7
-"""
8
+Reference: https://en.wikipedia.org/wiki/Maximum_subarray_problem
9
+"""
10
11
def kadanes_algorithm(arr: list[int]) -> int:
12
"""
0 commit comments