Create the data structure binary search tree print the


Problem

Different authors tend to use different vocabularies and to use common words information retrieval with differing frequencies. Given an essay or other text, it is interesting to find program what distinct words are used and how many times each is used. The purpose of this project is to compare several different kinds of binary search trees useful for this information retrieval problem. The current, first part of the project is to produce a driver program and the information-retrieval package using ordinary binary search trees. Here is an outline of the main driver program:

1. Create the data structure (binary search tree).

2. Ask the user for the name of a text file and open it to read.

3. Read the file, split it apart into individual words, and insert the words into the data structure. With each word will be kept a frequency count (how many times the word appears in the input), and when duplicate words are 345 encountered, the frequency count will be increased. The same word will not be inserted twice in the tree.

4. Print the number of comparisons done and the CPU time used in part 3.

5. If the user wishes, print out all the words in the data structure, in alphabetical order, with their frequency counts.

6. Put everything in parts 2-5 into a do ... while loop that will run as many times as the user wishes. Thus the user can build the data structure with more than one file if desired. By reading the same file twice, the user can compare time for retrieval with the time for the original insertion.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create the data structure binary search tree print the
Reference No:- TGS02645808

Expected delivery within 24 Hours