[prev] 5 [next]

Pointers

Reminder: In a linked list
  • each node contains a pointer to the next node
  • the number of values can change dynamically

[Diagram:Pic/linkedList2.png]

Benefits:

  • insertion/deletion have minimal effect on list overall
  • only use as much space as needed for values

In C, linked lists are implemented using pointers and dynamic memory allocation