# Reaching the Last Song, and Going Back One: Doubly Linked Lists

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.

![Cheat sheet: Reaching the Last Song, and Going Back One: Doubly Linked Lists](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/caeaa470640740e980414cf64bcc1161.webp)

- Category: Data Structures
- Level: Apprentice
- Tags: data structures, Doubly Linked List, Head and Tail (data-structures), Linked List
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-linked-list-operations-cheat-sheet
