Zend Framework
1.12
|
Public Member Functions | |
put ($element) | |
Add element to the queue. | |
top () | |
Return least element of the queue. | |
pop () | |
Removes and return least element of the queue. | |
clear () | |
Clear queue. | |
Protected Member Functions | |
_less ($el1, $el2) | |
Compare elements. | |
|
abstractprotected |
Compare elements.
Returns true, if $el1 is less than $el2; else otherwise
mixed | $el1 | |
mixed | $el2 |
clear | ( | ) |
Clear queue.
pop | ( | ) |
Removes and return least element of the queue.
O(log(N)) time
Find appropriate position for last node
put | ( | $element | ) |
Add element to the queue.
O(log(N)) time
mixed | $element |
top | ( | ) |
Return least element of the queue.
Constant time