Question: We want to write a C++ program that ask the user to inputs as many words as he/she wishes. Every time a word is input
We want to write a C++ program that ask the user to inputs as many words as he/she wishes. Every time a word is input by the user, this word is inserted in a Binary Search Tree (BST) based on its alphabetical order. Once the tree is created, we want to do the followings:
Display the content of the tree in pre-order.
Ask the user to input a new word and check if this words exists already in the Tree.
Ask the user to input a character and display all the words in the tree that end with this character.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
