Class: Algorithmable::DataStructs::Heap::Min

Inherits:
Imp
  • Object
show all
Defined in:
lib/algorithmable/data_structs/heap/min.rb

Instance Method Summary collapse

Constructor Details

#initialize(collection = []) ⇒ Min


5
6
7
8
9
# File 'lib/algorithmable/data_structs/heap/min.rb', line 5

def initialize(collection = [])
  super(collection) do |this, other|
    (this <=> other) > 0
  end
end