A

Searching Searching a binary search tree for a specific value can be a recursive or iterative process. bool BinarySearchTree::search(int val){ Node *next = this->root();while(next !=NULL){if(val == next->value()){returntrue;}elseif(val < next->value()){ next = next->left();}else{ next = next->right();}}//not foundreturnfalse;}

Insertion Insertion begins as a search would begin; if the root is not equal to the value, we search the left or right subtrees as before. Eventually, we will reach an external node and add the va…

**binary search tree**(**BST**), which may sometimes also be called an**ordered**or**sorted binary tree**, is a node-basedbinary treedata structure which has the following properties: The left subtree of a node contains only nodes with keys less than the node's key.The right subtree of a node contains only nodes with keys greater than or equal to the node's key.Both the left and right subtrees must also be binary search trees.Searching Searching a binary search tree for a specific value can be a recursive or iterative process. bool BinarySearchTree::search(int val){ Node *next = this->root();while(next !=NULL){if(val == next->value()){returntrue;}elseif(val < next->value()){ next = next->left();}else{ next = next->right();}}//not foundreturnfalse;}

Insertion Insertion begins as a search would begin; if the root is not equal to the value, we search the left or right subtrees as before. Eventually, we will reach an external node and add the va…