-
Notifications
You must be signed in to change notification settings - Fork 19.9k
MaximumSubArraySum #2877
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
MaximumSubArraySum #2877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please add some tests as in https://github.com/TheAlgorithms/Java/pull/2871/files
|
||
// Finding maximum subarray sum for the left subarray | ||
|
||
int leftMax = -1000000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use Integer.MIN_VALUE
} | ||
|
||
// Find maximum subarray sum for the right subarray | ||
int rightMax = -1000000000;//should be minimum value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
|
||
public class MaximumSubArraySum { | ||
//Maximum Subarray Sum using Divide and Conquer algorithm | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
} | |
} | |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Can I work under this issue? |
@siddhant2002 yes, feel free to implement this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code looks good to me
@siriak please check the pr |
@siddhant2002 which one? I've already reviewed this one |
@siriak please check the updated pr |
Superseded by #2913 |
Co-authored-by: Andrii Siriak <[email protected]>
Describe your change:
References
Checklist:
Fixes: #{$ISSUE_NO}
.