Back To Course Outline

Chapter 9 Linked Lists
Linked List:

  • The 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 -> NULL

    head -> 74 ->60-> 25 -> 82 -> 65 -> 23 -> NULL
               ------->   Delete 60

    head -> 74 -------> 25 -> 82 -> 65 -> 23 -> NULL
                         \ /
                          |
                          50   Insert 50

    head -> 74 -> 25 -> 50 -> 82 -> 65 -> 23 -> NULL

    Single Linked List (click it)       Exercise Double Linked List (click it)

    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