Function result of splitting pairs into nodes that exist in the tree tree and new nodes

tree

Format:

result of splitting pairs into nodes that exist in the tree tree and new nodes

Input:

list tree -
list pairs -

Output:

list - None

Properties that reference this function:

result of splitting pairs into nodes that exist in the tree tree and new nodes = output of the separate_nodes function where the input tree is tree, the nodes are pairs, the existing group is [ ], and the new group is [ ] (Separate old and new begin)

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, distance, previous)
    • result of splitting pairs into nodes that exist in the tree tree and new nodes = pair (exists, new)
    • result of updating nodes exists in tree tree with parent index index and parent distance distance = updated

    then result of adding or updating children pairs of the node at backwards index index in tree tree = result of pushing nodes new into tree updated where parent is index and parent distance is distance

    (link)


Comments

Please log in to add comments