Difference between revisions of "Linked Lists - Lists"
(Added basic deffinition) |
(Added adding and hiding in a lis) |
||
Line 1: | Line 1: | ||
− | A linked list is a list where each value is aware of the data that comes before and after the value. | + | A linked list is a list where each value is aware of the data that comes before and after the value. They have two lists, one contains the spaces within the list where a value can be placed the other contains the values with a pointer to the next. |
+ | |||
+ | To add to a linked list the new value must be placed in a space and assigned the pointer that the old value (or empty) was holding. | ||
+ | |||
+ | To stop a list finding a value while keeping it in the list, the pointer from the removed value can be moved to the value that used to point to the removed value. |
Revision as of 10:22, 30 November 2017
A linked list is a list where each value is aware of the data that comes before and after the value. They have two lists, one contains the spaces within the list where a value can be placed the other contains the values with a pointer to the next.
To add to a linked list the new value must be placed in a space and assigned the pointer that the old value (or empty) was holding.
To stop a list finding a value while keeping it in the list, the pointer from the removed value can be moved to the value that used to point to the removed value.