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

heap_sort.cpp: Adds Heap Sort Algorithm #107

Closed
wants to merge 6 commits into from

Conversation

vishwanath1306
Copy link

@vishwanath1306 vishwanath1306 commented Oct 1, 2018

This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes #22

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Fixes #{ISSUE_NUMBER}

By submitting this pull request I confirm I've read and complied with the
below declarations.

  • I have read the Contribution guidelines and I am confident that my PR reflects them.
  • I have followed the commit guidelines for this project.
  • My code follows the standard code structure.
  • This pull request has a descriptive title. For example, {Tag}: Add {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
  • This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.
  • This pull request shall only be reviewed and merged once all the checks pass. No maintainer or supporter shall be obliged to review it before this condition is met.
  • I have mentioned the issue number correctly (with hyperlink) in this pull request description.

After you submit your pull request, DO NOT click the 'Update Branch' button.

This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes NITSkmOS#22
Copy link
Member

@sangamcse sangamcse left a comment

Choose a reason for hiding this comment

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

Include this in README table also.
Comment is missing in the code.

Whatever changes you do, use git commit --amend instead of git commit for this PR.

}
cout<<endl;
return 1;
}
Copy link
Member

Choose a reason for hiding this comment

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

EOL missing

swap(input[0], input[i]);
heapify(input, i, 0);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

blank line missing

@sangamcse sangamcse changed the title heap_sort.cpp Adds Heap Sort Algorithm heap_sort.cpp: Adds Heap Sort Algorithm Oct 1, 2018
This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes NITSkmOS#22
Copy link
Member

@sangamcse sangamcse left a comment

Choose a reason for hiding this comment

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

You have created 3 commits. Squash them into one.
You can take help from http://api.coala.io/en/latest/Developers/Git_Basics.html#squashing-your-commits

coderobe and others added 3 commits October 1, 2018 21:42
# This is the 1st commit message:

bubble_sort: Add C++ Implementation

Add a simple C++ implementation of bubble sort

Closes NITSkmOS#20

# This is the commit message NITSkmOS#2:

heap_sort.cpp Adds Heap Sort Algorithm

This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes NITSkmOS#22
This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes NITSkmOS#22

heap_sort.cpp Adds Heap Sort Algorithm

This adds Heap Sort Algorithm which sorts the elements
in ascending order.

Closes NITSkmOS#22
Merge branch 'master' of https://github.com/thebrahminator/Algorithms into heap-sort-c++
@sangamcse
Copy link
Member

sangamcse commented Oct 1, 2018

You have changed from 3 commits to 6 commits. It will break my repo.
Please go through http://api.coala.io/en/latest/Developers/Git_Basics.html#squashing-your-commits once.

@vishwanath1306
Copy link
Author

vishwanath1306 commented Oct 1, 2018 via email

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.

[Algo]: Add Heapsort in C++
3 participants