Question: C++ Write a program that will read names from a file and put them in a binary search tree. Put in a printMap function that

C++

Write a program that will read names from a file and put them in a binary search tree. Put in a printMap function that will print the form of the tree using just the first 2 letters of each name in printing the form.

Print the names inorder (use passing of a function to print the node). Have it also search for a name that is in the binary search tree and a name that is not (your choice) it should say it found it and the name or didn't find it (and the name, of course). Also, remove a name (any), print the tree and print the map.

For example the data of: Fred Mertz, Betty Boop, Abner Little, Lucy Bee, Georgie Poo, Zac Smith

Should print out:

Fr

Be Lu

Ab Ge Za

Try the following data:

Nancy Drew

Greg Greed

Helen Hail

John Symthe

Orville Corn

Mustang Sally

Xena II

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!