Method: Containers::MinHeap#min
- Defined in:
- lib/containers/heap.rb
#min ⇒ Object
call-seq:
min -> value
min -> nil
Returns the item with the smallest key, but does not remove it from the heap.
minheap = MinHeap.new([1, 2, 3, 4])
minheap.min #=> 1
486 487 488 |
# File 'lib/containers/heap.rb', line 486 def min self.next end |