# Linked Lists
## Data Structures — The Codex Coding
**URL:** https://thecodex.expert/coding/data-structures/linked-lists/
**Type:** data-structure | **Confidence:** high | **Last verified:** 2026-06-01

## CANONICAL DEFINITION
A linked list is a data structure in which each element (node) stores a value and a pointer to the next node, forming a chain that allows O(1) insertion and deletion at the head but requires O(n) traversal to access an element by position.

## COMPLEXITY
- access: O(n)
- search: O(n)
- insert_head: O(1)
- insert_position: O(n)
- delete_head: O(1)
- space: O(n)

## REQUIRES
concepts/variables, data-structures/arrays

## ENABLES
data-structures/stacks, data-structures/queues

## COMMONLY CONFUSED WITH
Python list is a dynamic array not a linked list; not cache-friendly; singly linked deletion requires predecessor node

## SOURCES
- CLRS 4th ed. §10.2
- Knuth TAOCP Vol.1 §2.2.3
- Floyd 1967 JACM 14(4) — cycle detection
- ISO C17 §7.22.3 (malloc)

*The Codex Coding — thecodex.expert/coding/ — Free forever — Mumbai, India*
