Question: (a) Given the following Binary Search Tree. Assume nodes are already inserted in the binary search tree. (5 Marks) 8 (10 1 (14) 4 7)
(a) Given the following Binary Search Tree. Assume nodes are already inserted in the binary search tree. (5 Marks) 8 (10 1 (14) 4 7) (13) The (*root) pointer has address of node (8). The code (given below) is printing numbers (nodes) of Binary Search Tree. Write how the code will print numbers on the computer screen? 7/Assume nodes are already inserted in the binary search tree void DisplayTree (BSTree *parentNode) t if parentNode == NULL) return; std::cout data; DisplayTree (parentNode->leftChild); DisplayTree (parentNode->rightChild); std::cout data; 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
