Skip to content
On this page

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.2

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