tree insert move right

if the following are true:
  • val > a
  • the element at index i of stack tree = node (a, left, right)

then output of the bst_insert function where input tree is tree, value is val and index is i = output of the bst_insert function where input tree is tree, value is val and index is right


Comments

Please log in to add comments