Fix the bug in the Maximum Subarray algorithm which outputs zero when... by CloudSir · Pull Request #44 · algorithm-visualizer/algorithms
Repository navigation
Fix the bug in the Maximum Subarray algorithm which outputs zero when... - #44
Open
CloudSir wants to merge 1 commit into algorithm-visualizer:master from CloudSir:patch-1
Open
Fix the bug in the Maximum Subarray algorithm which outputs zero when... #44 CloudSir wants to merge 1 commit into algorithm-visualizer:master from CloudSir:patch-1
Conversation
CloudSir commented Oct 1, 2025 · edited Loading
Copy link Copy Markdown
Fix the bug in the Maximum Subarray algorithm which outputs zero when the array is all negative numbers.
For example, when the array is [-2, -3, -2, -1, -2, -4, -5, -3],
the correct output is -2, but it outputs 0.
Fix the bug in the Maximum Subarray algorithm which outputs zero when...
2124bc6
... the array is all negative numbers.Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment