Question: 3. (10 pts) Complete the function findMin to return the smallest value in the tree. The smallest value in a BST is the leftmost node

3. (10 pts) Complete the function findMin to return the smallest value in the tree. The smallest value in a BST is the leftmost node in the tree. If the tree is empty. return 99999 (done for you). Otherwise, check if the node has no left subtree if so, return that node's value. Otherwise, keep processing the left subtree. TreeData findMin (TreeNodet( if (t-= NULL) return 99999; //special value while (t-NULL) // complete code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
