linked list
A sequence made of nodes scattered in memory, each holding a value and a pointer to the next node.
In more detail
Inserting or removing next to a node you already hold costs O(1): you only rewire a pointer. Reaching position k means walking from the head through k nodes, so index access is O(n). Linked lists win when you hold references to nodes and must splice them in and out often, as in timer queues and LRU caches.
Example
React fibers point to child, sibling and parent, and each fiber stores its hooks as a list walked in call order.Related terms
- singly linked list — A linked list in which each node points only to the next node, so it can be walked in one direction.
- doubly linked list — A linked list in which each node points to both the next and the previous node, so it can be walked either way and any held node removed in O(1).
- node (data structure) — One element of a linked structure, holding a value and one or more pointers to other nodes.
- sentinel node — A dummy node that sits permanently at the start of a linked list and holds no real data, so the list is never truly empty.
- Python list — Python's built-in ordered, growable sequence, implemented as a dynamic array of pointers to objects.
- Fiber — The internal object React keeps for each component instance, and the name of the React 16+ engine built on those objects.
- hook list — The ordered list React stores on each fiber, holding one record for every hook the component called during render.
- pointer — A value that stores the memory location of another piece of data, so the program can follow it to that data.
Taught in
- What A Hash Function Promises — Algorithms & Data Structures for Working Engineers
- Collisions In Practice And Hash Flooding — Algorithms & Data Structures for Working Engineers
- Linked Lists: Nodes, Pointers And Sentinels — Algorithms & Data Structures for Working Engineers
- Stacks And Queues: Last In Or First In — Algorithms & Data Structures for Working Engineers
- Choosing The Right Sequence — Algorithms & Data Structures for Working Engineers
- Binary Trees And Their Traversals — Algorithms & Data Structures for Working Engineers
- React Fiber Architecture: Work Units, Priority And Commits — React 19 & Modern Component Architecture
- Rules of Hooks: Call Order, Hook Lists, And Fiber Storage — React 19 & Modern Component Architecture