Consider the operation of deleting the root of a binary search tree. If the root has two children, then the root node should be removed, then the last node in the right subtree should be deleted and used to replace the root.
What is meant by binary search tree?
- A binary search tree (BST) also has the following two characteristics: Each node can have a maximum of two children.
- Each node's left descendent nodes have lower values than the current node, which has lower values than the right descendent nodes (if any).
- The term "binary search tree" (BST) refers to a binary tree in which each node has a Comparable key (and an associated value) and abides by the constraint that no node's key cannot be both greater than and smaller than any other node in the node's left and right subtrees.
- A Binary Search Tree (BST) has a comparable value for each node, and children with lower values are linked to the left and children with higher values are linked to the right.
- As a result, every Binary Tree is a BST, but not every BST is a Binary Tree.
To learn more about binary search tree refer to:
https://brainly.com/question/18956722
#SPJ4