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

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!