1.0.13 • Published 4 years ago

priority-queue-v2 v1.0.13

Weekly downloads
176
License
ISC
Repository
github
Last release
4 years ago

priority-queue-v2

Published at - https://www.npmjs.com/package/priority-queue-v2

queue - add an element to the queue dequeue - delete the max priority element from the queue isEmpty - returns true/false clear - clear the queue delete - If we need to update the priority, delete that item and insert it in again list - contents of heap

The Item stored in the queue should be class and a comparator should be provided. By default, duplicate elements are not allowed. To allow duplicates in the queue add the allowDuplicates argument to true. let obj = new PriorityQueue(comparator, true)

let comparator = function (a, b) { return a >= b ? false : true }

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago