Question: a it's a java question, thank you very much! Question 3 (15 marks A doubly linked list that specifically stores strings is modified to enhance

a it's a java question, thank you very much! Question 3 (15marks A doubly linked list that specifically stores strings is modified toenhance its efficiency. The linked list will now be an "indexed" doublylinked list so that the location of strings starting with the lettersa

it's a java question, thank you very much!

Question 3 (15 marks A doubly linked list that specifically stores strings is modified to enhance its efficiency. The linked list will now be an "indexed" doubly linked list so that the location of strings starting with the letters of the alphabet 'a 'b', 'c',... z' are easily located (lower case letters only for this question) All strings starting with a given letter are stored (together) in sequence in the linked list. For example, "apple", aircraft antenna banana ball baseball balloon "cat", caramel category", etc. is an example of some strings that can be stored in such sequence in the linked list To achieve this kind of indexing, a one dimensional array called "index" of size 26 is used. Each element in the array points to the starting location in the linked list that holds the corresponding character. For example, index[0] points to the first node in the linked list that has strings that start with the letter 'a', and so on. A null value indicates there are no strings of this kind in the list. "apple" "aircraft" "antena'' "banana cat head Size index 25 The diagram above shows the memory representation after inserting the first 5 elements. The execution of the test program below must produce the following result apple, aircraft, antena, banana, cat h Happle, aircraft, antena, banana, ball, baseball, balloon, cat, caramel, case {apple, aircraft, antena, banana, ball, baseball, balloon, caramel, case h Happle, aircraft, antena, ball,baseball, balloon, caramel, case Indexed LinkedList l l new Indexed LinkedList 1. add "apple 1. add aircraft" 1. add "banana 1. add ("antena 1. add ("cat

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!