6(a)Linked ListsMedium3 marks
A linked list is an example of an Abstract Data Type (ADT). A linked list is implemented using a 1D array for the data items, a 1D array for the link pointers, and a start pointer. The linked list maintains the data items in alphabetical order.
The state of the linked list after five data items have been added is:
Complete the diagram to show the StartPointer and the contents of the arrays Data and Pointer, for array indexes 1 to 5 (indexes 6 to 20 stay unused).
| Array index | Data | Pointer |
|---|---|---|
| StartPointer | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 |