At the end of this lecture, you’ll be able to:
- Define what a Linked List is.
- Enumerate the advantages & disadvantages of a linked list based vs. an array-based implementation.
- Trace the basic operations of a (singly) linked-list implementation.
- Understand the basic operations of a (singly) linked-list well enough to implement them.
- Implement an iterator for a (singly) linked-list.
- Appreciate that members of a static nested class (Node for Linked List) can be accessed by the outer class, but not the other way around.
IndexedListoperations with a (singly) linked list implementation (
In this lecture, we'll cover the following lessons:
- Array: A Static Data Structure
- Linked List: A Dynamic Data Structure
- Java Interlude: Static Nested Class
- Array vs. Linked List
- Build a Linked List⚡
- Linked List: Follow the References!⚡
- Linked List Operation: Prepend⚡
- Linked List Operation: Traverse⚡
- Linked List Operation: Get⚡
- Linked List Operation: Append⚡
- Linked List Operation: Insert⚡
- Linked List Operation: Delete⚡
- Linked List Iteration: The Iterator!⚡
- Exercise: LinkedIndexedList⚡
Lessons marked with ⚡ contain exercise/activity.