Min and Max PriorityQueue
Priority Queue with dynamic change priority. Array and Dictionary data types are used internally. Change Priority function works in amortized constant time, though the change in heap is in O(log n) (The supposed enhancement for previous implementation).
Thanks for the PR! There are already implementations for Priority Queues (https://github.com/felipernb/algorithms.js/blob/master/src/data_structures/priority_queue.js) Do you think you could make your changes on top of that instead?
Since new implementation required changes to be made in almost every method, the code is similar to initial PR but I have updated the method names accordingly to provide the same abstraction.
Coverage increased (+0.2%) to 96.668% when pulling 2bf4a043b97c6a97df5d79500b30a3a73e7fc5d3 on forgotter:priority_queue_patch into 7df9bd1a0a56b8ba0fb1da896537eee589bc2380 on felipernb:master.
@felipernb Any updates on this, Sir? If there any issue with code, I shall modify it to fix the requirements.