Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate duplicate implementations of max subarray #8849

Merged
merged 6 commits into from
Jul 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typo in dynamic_programming/max_subarray_sum.py
  • Loading branch information
tianyizheng02 committed Jun 30, 2023
commit 2262801917c0c04c7103d5e6f53fb89cb76c3ca9
2 changes: 1 addition & 1 deletion dynamic_programming/max_subarray_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
the array [-2, 1, -3, 4, -1, 2, 1, -5, 4], the contiguous subarray with the maximum sum
is [4, -1, 2, 1], so the maximum subarray sum is 6.

Kadane's algorithm is simple dynamic programming algorithm that solves the maximum
Kadane's algorithm is a simple dynamic programming algorithm that solves the maximum
subarray sum problem in O(n) time and O(1) space.

Reference: https://en.wikipedia.org/wiki/Maximum_subarray_problem
Expand Down