Class: CompSci::CompleteBinaryTree

Inherits:
CompleteTree show all
Defined in:
lib/compsci/complete_tree.rb

Instance Attribute Summary

Attributes inherited from CompleteTree

#array

Instance Method Summary collapse

Methods inherited from CompleteTree

#bf_search, children_idx, #df_search, #display, gen, #last_idx, parent_idx, #pop, #push, #size

Constructor Details

#initialize(array: []) ⇒ CompleteBinaryTree

Returns a new instance of CompleteBinaryTree.


92
93
94
# File 'lib/compsci/complete_tree.rb', line 92

def initialize(array: [])
  super(array: array, child_slots: 2)
end