Function result of pushing values elements to tree tree

push new nodes to tree

Format:

result of pushing values elements to tree tree

Input:

list tree -
list elements -

Output:

list - None

Properties that reference this function:

result of pushing values [ a, rest ] to tree tree = result of pushing values rest to tree [ node (a, [ ]), tree ] (create children nodes)
result of pushing values [ ] to tree tree = tree (create children nodes finished)

Conditional properties that reference this function:

  • if the following are true:
    • ((length of stack tree) - 1) - index = back_i
    • the element at index back_i of stack tree = node (value, cs)
    • elements of numbers that are not in tree tree = new_elements
    • result of storing (node (value, new_elements)) at index back_i of stack tree = updated

    then result of adding numbers to tree tree as children of the node at backwards index index = result of pushing values new_elements to tree updated

    (link)


Comments

Please log in to add comments