Ruby-BST/main.rb
# to_a function: returns a sorted array of all the elements in the BST.
to_a function: returns a sorted array of all the elements in the BST.
to_a function : returns a sorted array of all the elements in the BST .
def to_a
    sorted_array = []
    to_a_helper(@root, sorted_array)
    sorted_array
  end
def to_a sorted_array = [ ] to_a_helper ( @root , sorted_array ) sorted_array end
to_a function: returns a sorted array of all the elements in the BST.
to_a function : returns a sorted array of all the elements in the BST .