For this project, you will implement a binary search tree and use it to store a large text file (JAVA). Your program should read text from a file and insert each word in a binary search tree. Do not store duplicate text. Once the tree is populated, print the contents of the tree using an in-order traversal. Next, allow the user to enter words to search for. For each word entered, your program should report the number of elements inspected and whether or not the word was located. Next, allow the user to enter words to remove from the tree. After each removal, print the contents of the tree. Provide an analysis of your remove and search algorithms using Big-O notation. Be sure to provide justification for your claims.
The purpose of this assignment is to practice (JAVA):
- Implement a binary search tree structure
- Demonstrate tree traversals
- Analyze and compare algorithms for efficiency using Big-O notation
For this project, you will implement a binary search tree and use it to store a large text file (JAVA). Your program should read text from a file and insert each word in a binary search tree. Do not store duplicate text.
Once the tree is populated, print the contents of the tree using an in-order traversal. Next, allow the user to enter words to search for. For each word entered, your program should report the number of elements inspected and whether or not the word was located. Next, allow the user to enter words to remove from the tree. After each removal, print the contents of the tree.
Provide an analysis of your remove and search algorithms using Big-O notation. Be sure to provide justification for your claims.
(Look at image attached for sample run)


Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
