Linked Lists

Agenda

  1. The LinkedList and Node classes
  2. Implementing append
  3. Implementing deletion
  4. Bidirectional links
  5. Incorporating a cursor
  6. Run-time analysis
  7. Closing remarks

1. The LinkedList and Node classes

2. Implementing append

Option 1

Option 2

3. Implementing deletion

Deleting the head

Deleting the tail

5. Incorporating a cursor

6. Run-time analysis

Run-time complexities for circular, doubly-linked list of $N$ elements:

7. Closing remarks

Lab 5, 1.Subscript-based access (if time permits)