Skip to content
On this page
class · Ruby 4.0

SyntaxSuggest::PriorityQueue

< Object 11 instance methods 1 class methods

Holds elements in a priority heap on insert

Instead of constantly calling sort!, put the element where it belongs the first time around

Example:

Example
queue = PriorityQueue.new
queue << 33
queue << 44
queue << 1

puts queue.peek # => 44

Class methods 1

Instance methods 11

Attributes
Read
No documentation available