Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@CloudSir
Copy link

@CloudSir CloudSir commented Oct 1, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.