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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!