Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started