Implement a Binary Search Tree that will store a sequence of words. The tree wil
ID: 3537574 • Letter: I
Question
Implement a Binary Search Tree that will store a sequence of words. The tree will maintain a unique set of words read in from a text file. Change all words to uppercase.
Each node in the tree will keep tally of how many times the word appears in the file.
When a word is Inserted in the tree, if the word is already in the tree, increment the occurrence count.
Once the tree is built, the user can search for a word. The output should be either that the word is not in the text, or if it is, how many occurrences of the word there are.
The user can delete an occurrence of a word. If the deletion causes the count to be zero, delete the word from the tree. When the user deletes a word, print the word and its frequency and if it is removed from the tree, print a message.
Provide a method to print the maximum, minimum and average height of the tree.
Provide a way to both print an inorder traversal of the tree and save an inorder traversal to a file.
here are some of the files that I have completed that can contribute:
https://dl.dropboxusercontent.com/u/106289751/BST.zip
Explanation / Answer
Ok. I ll do it Juan. What is the deadline?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.