2.0.0 • Published 5 years ago

wolf-queue v2.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Wolf Queue

A lightweight implementation of a queue data structure.|

PropertiesProperty Descriptions
maxreturns the maximum numeric value stored in the queue
lastreturns the last value in the queue
sizereturns the amount of values stored in the queue

Methods (In Constant Time)Method Descriptions
add(value)adds a value to the queue
isEmpty()returns a boolean indicating if the queue has any values
peek()returns the first value in the queue
remove()removes the first value in the queue
clear()removes all values from the queue

Methods (In Linear Time)Method Descriptions
has(value)returns a boolean indicating if the queue contains the passed value
printlogs all the values of the queue to the console as a string
reversereverses the order of the queue in place