Use what you learned in recitation to write the nodes visite

Use what you learned in recitation to write the nodes visited after each function: node* searchPreorder(int value, node* current) node* searchPostorder(int value, node*current) node* searchlnorder(int value, node* current) on the root of following binary search tree Show to your TA the visited nodes in the form of arrays, i. e. write down the arrays: int inOrderArray[6]; int postOrderArray[6]; int preOrderArray[6];

Solution

searchPreOrder will visit only node 10

searchPostOrder will visit {4,7,6,15,14,10}

searchInOrder will visit {4,6,7,10}

before the value of root node is searched

inOrderArray[6] = {4,6,7,10,14,15}

postOrderArray[6] = {4,7,6,15,14,10}

preOrderArray[6] = {10,6,4,7,14,15}

 Use what you learned in recitation to write the nodes visited after each function: node* searchPreorder(int value, node* current) node* searchPostorder(int val

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site