Chapter 9 Linked Lists
Linked List:
Single Linked List (click it) ExerciseThe length of the list can grow without limits by adding new links. New items can be inserted into list by merely breaking a connection, adding a new link, and restoring the connection. Items are removed from the list by breaking two connections, removing a link, and then reconnecting the chain. head -> 74 -> 60 -> 25 -> 82 -> 65 -> 23 -> NULLhead -> 74 ->
60-> 25 -> 82 -> 65 -> 23 -> NULL
-------> Delete 60head -> 74 -------> 25 -> 82 -> 65 -> 23 -> NULL
\ /
|
50 Insert 50head -> 74 -> 25 -> 50 -> 82 -> 65 -> 23 -> NULL
front ---> NULL (Empty List)
node<T> * front = NULL;
Compare a single linked list with a double linked list:
Look at coding in the book:
The following are information from your textbook:
program
9.1
program
9.2
program
9.3
program
9.4