Function output of the bst_insert function where the input tree is tree, value is value, visited is visited, and moves are moves
tree insert tree
Format:
output of the bst_insert function where the input tree is tree, value is value, visited is visited, and moves are moves
Input:
any tree -
any value -
list visited -
list moves -
Output:
list - None
Properties that reference this function:
result of inserting value to tree tree = output of the bst_insert function where the input tree is tree, value is val, visited is [ ], and moves are [ ] (tree insert convert)
Conditional properties that reference this function:
- if val < a, then output of the bst_insert function where the input tree is (node (a, left, right)), value is val, visited is visited, and moves are moves = output of the bst_insert function where the input tree is left, value is val, visited is [ node (a, None, right), visited ], and moves are [ "L", moves ] (link)
- if val > a, then output of the bst_insert function where the input tree is (node (a, left, right)), value is val, visited is visited, and moves are moves = output of the bst_insert function where the input tree is right, value is val, visited is [ node (a, left, None), visited ], and moves are [ "R", moves ] (link)
- if val < a, then output of the bst_insert function where the input tree is (node (a, None, None)), value is val, visited is visited, and moves are moves = result of building the BST from nodes [ node (a, (node (val, None, None)), None), visited ] and moves moves (link)
- if val > a, then output of the bst_insert function where the input tree is (node (a, None, None)), value is val, visited is visited, and moves are moves = result of building the BST from nodes [ node (a, None, (node (val, None, None))), visited ] and moves moves (link)
Comments
Please log in to add comments