THE ATHENA LIBRARY
Data Structures in Practice
Yonas Alemu textbook
Chapter 3
Linked lists
A linked list stores each element in a node that points to the next. Inserting at the head takes constant time, but finding the k-th element requires walking k nodes.
Implementing the list as a generic class LinkedList<T> lets the same code store integers, strings or custom objects safely.
Compare with arrays: contiguous storage gives fast indexing but costly insertion in the middle.
Fictional educational sample written for the Athena demo · Page 54 of 388.
50%saved