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

The min/max-heap is wrong implementation in python #3904

Open
1 of 4 tasks
soc221b opened this issue Nov 8, 2018 · 2 comments
Open
1 of 4 tasks

The min/max-heap is wrong implementation in python #3904

soc221b opened this issue Nov 8, 2018 · 2 comments

Comments

@soc221b
Copy link

soc221b commented Nov 8, 2018

This is a(n):

  • New algorithm
  • Update to an existing algorithm
  • Error
  • Proposal to the Repository

Details:

the min heap is not a min-heap, but heap sort (also the max-heap).

@Koustav-Samaddar
Copy link

Koustav-Samaddar commented Dec 26, 2018

@iattempt According to me both heap implementations seem to be correct.

Performing heap sort would be to repetitively perform pop_root on the heaps - which the code doesn't do.

@soc221b
Copy link
Author

soc221b commented Jan 12, 2019

@Koustav-Samaddar There is a Heap sort.

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

No branches or pull requests

2 participants