Previous Lecture | lect05 | Next Lecture |
Code from lecture
https://github.com/ucsb-cs24-w22/cs24-w22-lectures/tree/main/lect05
Topics
- Discuss options for storing an evolving list of values. Array (doesn’t really work because fixed size). Better options: vector and linked list
- Intro to linked lists: We’ll start with a C-style implementation focussing on the concept of creating and modifying a linked chain
- Create an empty list and write a function to append a new node to the linked list
- Print the elements of the list: key concept includes iterating over the nodes of the linked list using a traversal pointer