Class: CompSci::CompleteBinaryTree

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

Instance Attribute Summary

Attributes inherited from CompleteNaryTree

#array

Instance Method Summary collapse

Methods inherited from CompleteNaryTree

#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.



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

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