Class: priority_queue

priority_queue()

Data structure: priority_queue

Constructor

new priority_queue()

Init priority_queue
Source:

Methods

back()

To get the back value of queue
Source:
Returns:
number The back value of queue

empty()

To get the queue is not empty(true or false)
Source:
Returns:
bool The queue is not empty

front()

To get the top value of queue
Source:
Returns:
number The front value of queue

getMax()

To get the index of back value of queue
Source:
Returns:
number The index of back value of queue

pop()

To remove the last value of queue
Source:

push(value)

To push value
Parameters:
Name Type Description
value anyType The value of you want to pushed the value
Source:

top()

To get the max value of queue
Source:
Returns:
number The front value of queue