Logout

5.1.12

Describe how linked lists operate logically.

 

Teaching Note:

LINK Logical thinking.

 

Sample Question:

sdfsdfsf

From Sample Paper 1 - 2014:

 

JSR Notes:

There will be more on the two main dynamic structures, lists and trees, in the OOP option, and it is there that I'll link to the appropriate Java Revolution pages.

And more than you need by way of introduction is in the 5.1.7 video, but if you were asked in a sentence or two to describe what lists are and how they logically operate, you would say something like:

What Lists Are:

Lists are collections of nodes which contain both data and a pointer to the next node. Because they do not have to occupy contiguous spots in memory, like arrays, they are able to be dynamic structures, meaning, unlike an arrays, they can grow and shrink in size.

How Lists Operate:

Lists have a head node which gives access to the list. Access to all other nodes is via the head through a series of links from the head to the next node, and then from that node to the next, and so on and so on. Each node knows where the other node is located, via storing the memory address of that next node in the pointer attribute of it - this stored next memory address is referred to as the "pointer". The end of the list is reached when the pointer is null.