Share
Explore BrainMass

Figuring out some problems on linked lists

Use the linked lists contained in the array pictured in Figure 6.19 to answer the following questions:
a. What elements are in the list pointed to by list1?
b. What elements are in the list pointed to by list2?
c. What array positions (indexes) are part of the free space list?
d. What would the array look like after the deletion of Nell from the first list?
e. What would the array look like after the insertion of Anne into the second ist? Assume that before the insertion the array is as pictured in Figure 6.19.

I have attached Figure 6.19

Attachments

Solution Preview

A. For list 1, we start with node 0. So John is in the list. We see 4 on "next" item. So we go to node 4. So Nell is in the list. Now we see 8 on "next" item. So we go to node 8. So Susan is in the list. Now we see 9 on "next" item. So we go to node 9. So Susanne is in the list. ...

Solution Summary

The solution gives detailed steps on figuring out some problems on linked lists.

$2.19