Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

** Please help me out, I\'m trying to study for my final and this question is a

ID: 3660111 • Letter: #

Question

** Please help me out, I'm trying to study for my final and this question is a practice example to prepare myself for the final **


In lecture and a lab we discussed Java code to create a concordance, that is, the number of occurrences of each distinct word in a file. Here we're going to make a version of our Concord class that creates a concordance that computes the locations of each distinct word in a file. We will use the line number as a word's location. Here is an example of some input, and the corresponding output when we build a concordance for it and print it Gust using toString-type format the big dog went to the big dog and the other big dog went to the the big elephant and [2], big C1, 2, 3] dog C1, 2], elephant C3J, other C2J, the C1, 2, 30, to C1, 2] went [1, 2J1 Note that even if a word appears more than once on a line, we only list that line number once. Some more details of the problem: You don't have to worry about putting words into some canonical form for the purposes of thi problem (e.g., you may assume there is no punctuation or capital letters in the input). For a file with n words your code must build the concordance in at worst nlogn time, and be able to print it out in alphabetical order in linear time (you are not required to write the toString code It is expected that you will use the Java library to make your code short and fast. See the code handout for a reminder of some classes and methods. We have written the code to read the file for you below. You need to fill in the private data, complete the constructor, and complete build by implementing the private method process Line.

Explanation / Answer

it print 1->2->3->1->2->3->1->2->3-> and so on. its a circular Link list