You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This implementation of the min-priority queue contains some inconsistencies that need to be fixed :
(I stumbled upon this while working on #720 which involves dozens of unrelated algorithms so I may have missed some things)
heapSort() should be call reverse() and should not rely on delete() to reverse the heap ordering.
delete() should delete the highest priority value (for now, it only decreases the heap size but the element remains in it and is just pushed back instead, like a rotation).
Also, adding some explanation (ie. why and how to use it), as well as some Jest tests would be much appreciated.
Activity
pasagedev commentedon Oct 16, 2021
I could like work on this can assign me @raklaptudirm ?
fixes: TheAlgorithms#774 - add test and fix MinPriorityQueue implemen…
merge: fixes: TheAlgorithms#774 - add test and fix MinPriorityQueue i…