Data Structures

Linked List

Definition

A linear data structure where each element (node) contains a value and a pointer to the next node. Unlike arrays, linked lists don't require contiguous memory and allow O(1) insertions at the head, but have O(n) random access.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms