tree delete two children parent
if the following are true:
- index of value value in tree = i
- find nearest largertree = n
- the element at index n of stack tree = node (larger, nleft, nright)
- the element at index i of stack tree = node (value, left, right)
then pop value from tree tree = result of storing (node (larger, left, right)) at index i of stack (pop larger from tree tree)
Comments
Please log in to add comments