Question: Write in Java. You will be making a binary search tree class. Then you will use it to import a text file and create a
Write in Java.
You will be making a binary search tree class. Then you will use it to import a text file and create a word frequency histogram.
Your binary search tree class should have the following methods:
searchfinds and returns the node that matches a search key (if it exists; otherwise return null)
insertinserts a node into the tree
deletedeletes a node from the tree
printtraverse (inorder) and print each node
any methods you need to solve the problem of using a tree to make a word frequency histogram. You should be able to read a file and add a word if it isnt in the tree yet and update a counter associated with it if it is in the tree.
Example:
Input: This sentence repeats words because a sentence that repeats words makes a good example sentence.
Output:
a 2 because 1 example 1 good 1 makes 1 repeats 2 sentence 3 that 1 this 1 words 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
