Question: Write a method IN JAVA, createArrayOfLL that takes a file of words, one in each line and creates an array of linked list nodes as

Write a method IN JAVA, createArrayOfLL that takes a file of words, one in each line and creates an array of linked list nodes as follows.

(a) Create an array of 26 linked lists

(b) Open the file and Insert each word into the array based on its first letter, eg: any word that begins with a goes to A[0] list etc..

(c) Return the reference to the array of linked lists You must consider ALL cases . You must write reasonable comments to describe your algorithm.

You may assume public fields for each node, data and next. There WILL NOT be any partial credit for this problem.

The question will be graded ALL or NOTHING. [Use extra paper, if necessary to write the answer].

Node class is defined as follows.

Public Node[] createArrayOfLL(String inputfile) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!