We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3613f5 commit 1372675Copy full SHA for 1372675
dynamic_programming/max_sub_array.py
@@ -4,6 +4,7 @@
4
"""
5
from __future__ import annotations
6
7
+
8
def max_sub_array(a: list[int]) -> int:
9
10
return the largest sum of a contiguous subarray.
@@ -31,6 +32,7 @@ def max_sub_array(a: list[int]) -> int:
31
32
answer = sol[i]
33
return answer
34
35
36
if __name__ == "__main__":
37
38
A random simulation of this algorithm.
0 commit comments