EECS 280 Lecture 17: Linked Lists
Document Summary
The compiler will not let you override a function differing in return type - only with different parameters. Idea that you can keep growing these structures - keep adding on information to them. Pros: fast indexing and pointer arithmetic under the hood. Cons: increasing capacity requires creating a new array - allocating more memory. Con - we have to allocate more memory because now we would have the information and the pointer that points to it. Each piece of the list contains a datum but also a next pointer containing the address of the next piece. Here, we"re using structs to represent the nodes. There"s a pointer to the next piece of the list. We can create a class object called list that contains all of these nodes, and here we can add member functions that let us edit them. can add member functions that let us edit them.