Question: There are three different orders to traverse a binary tree. They are inorder, and preorder, and postorder. Please tell which order is best (necessary) for
There are three different orders to traverse a binary tree. They are inorder, and preorder, and postorder. Please tell which order is best (necessary) for the following operations: Destroy a binary tree Copy a binary tree Print nodes in alphabetical order Complete the following recursive function. void RevPrint (NodeType*listPtr)//Pre; listPtr is an external pointer to a list.//Post; Values in the list have been printed in reverse order. {if(_______ {______; _____;}} Complete the following recursive function that inserts an item into a binary search tree. void Inser(TreeNode*& tree, ItemType item) {if (______) tree = _____; tree rightarrow right = ____; tree rightarrow left = _____; tree rightarrow info = ______;} else if (_____
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
