Question: Doesnt this contradict?(c++) BST is made by comparing strings For preorder, the root would be Apple with left child banana and right child cat. How

Doesnt this contradict?(c++) BST is made by comparing strings
For preorder, the root would be Apple with left child banana and right child cat. How is banana smaller than apple?
And in inorder, the root would be banana, left child apple, right child cat
For postorder, the root is apple, left child cat, right child banana.
How does this make sense? The root for each order is different
 Doesnt this contradict?(c++) BST is made by comparing strings For preorder,

21:16 learn.z zyBookse 2 2. Remove 3. Print 4. Search 5. Smallest 6. Largest 7. Height 8. Quit Preorder apple(2), banana (), cat (). anana (3), cat (1), Inorder apple (2), banana (3),cat (1) Postorder-cat (1), banana (3), apple (2) Enter menu choice: 1. Insert 2. Remove 3. Print 4. Search 5. Smallest 6. Largest 7. Height 8. Quit Enter string to remove: Enter menu choice: 1. Insert 2. Remove 3. Print 4. Search 5. Smallest 6. Largest 7. Height

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!