# Linked Lists

Train cars coupled together: build a linked list, add and remove cars, walk it both ways, and compare its cost card with an array's.

Updated: November 17, 2026

## [Linked Lists](https://www.ask-codey.com/courses/data-structures/topics/ds-linked-lists)

1. ["Play Next" Without Moving Everyone: Linked Lists](https://www.ask-codey.com/lessons/ds-linked-lists) (Apprentice): Tapping "Play next" on a long up-next queue moves every song in it. Find a way to put a song at the front in two steps at any length, and meet the structure that does it: the linked list.
2. [Reaching the Last Song, and Going Back One: Doubly Linked Lists](https://www.ask-codey.com/lessons/ds-linked-list-operations) (Apprentice): A linked list knows its first song, but "Add to queue" needs the last one and the Previous button needs the one before. Make both one step, and add and remove anywhere you already are by changing a couple of references.
3. [Arrays vs Linked Lists](https://www.ask-codey.com/lessons/ds-arrays-vs-linked-lists) (Journeyman): Put the growing array's and the linked list's cost cards side by side, see why growing arrays win most of the time in real code, and learn the jobs where a linked list is the better fit.

## [Exercise: A Playlist You Can Walk](https://www.ask-codey.com/courses/data-structures/topics/exercise-ds-linked-playlist)

1. [Exercise: A Playlist You Can Walk](https://www.ask-codey.com/lessons/exercise-ds-linked-playlist) (Apprentice): "Play next" lags on long up-next queues, and Previous must be instant: build a music player's playlist where next, previous, play next and remove each take the same moment at any length, with the tests checking every end and a 200,000-song run, and name each method's Big-O.

Source: https://www.ask-codey.com/courses/data-structures/chapters/ds-linked-lists
