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

Kadane's Algo #357

Closed
wants to merge 5 commits into from
Closed

Kadane's Algo #357

wants to merge 5 commits into from

Conversation

RAshid602
Copy link
Contributor

@RAshid602 RAshid602 commented Oct 8, 2021

Issue Id you have worked upon -

#352

Briefly explain your program logic -

Here we will be given array an we have to find max sub Array
i).We will add the subArray and store in CurrentSum.
ii).If CurrentSum is greater than MaxSum update MaxSum,
iii).If CurrentSum is less than zero(negative) discard the sum.i.e.CurrentSum=0;
iv).Return the MaxSum.

Screenshots(Attach 2 screenshots of your own input and output) -

kadane ans1
kadane ans2

Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

  • I have mentioned the question as comment in my solution file.

  • My code follows the guidelines of this project.

  • I have performed a self-review of my own code.

  • I have commented my code.

  • My code gives the correct output.

  • I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.

  • I affirm that I strictly follow contributing guidelines and code of conduct.

@RAshid602
Copy link
Contributor Author

I think its done.
let me know if there anything to change.

Copy link
Contributor Author

@RAshid602 RAshid602 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxsum value is updated.

@SarthakKeshari
Copy link
Owner

@RAshid602,
Kindly re-commit your files. Its showing two files, which in turn is trying to delete another file in the repository.

@RAshid602
Copy link
Contributor Author

@RAshid602, Kindly re-commit your files. Its showing two files, which in turn is trying to delete another file in the repository.

Can you delete replace.java file,
I think after than it will be resolved.

@ravi0213
Copy link
Contributor

ravi0213 commented Oct 9, 2021

@RAshid602 here is the easiest way to do this.

First, revert your last commit which deletes the file with `git revert HEAD~1`
then recommit without deleting it.

If it is not the last commit that deletes the file then change HEAD~1 with that commit hash.

@RAshid602
Copy link
Contributor Author

RAshid602 commented Oct 10, 2021

I am not been able to do that
Can I generate a new issue with same question.
i will be able to push that one easily.👀

@SarthakKeshari
Copy link
Owner

I am not been able to do that Can I generate a new issue with same question. i will be able to push that one easily.👀

Ok if that is the case. Create a PR then. You may close this one, once you have read this comment.

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.

3 participants