---
title: "Linked Lists and Nodes That Point"
description: "Storing a sequence as nodes that each hold a value and a reference to the next node. Inserting in the middle costs two pointer changes, but reaching the five hundredth item means walking there one nod"
canonical: https://lightmysky.com/learn/computing/linked-lists-and-nodes-that-point-mt_HvY7_-M2Zj
source: https://lightmysky.com/learn/computing/linked-lists-and-nodes-that-point-mt_HvY7_-M2Zj.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Linked Lists and Nodes That Point

Storing a sequence as nodes that each hold a value and a reference to the next node. Inserting in the middle costs two pointer changes, but reaching the five hundredth item means walking there one node at a time.

Subject: Computing · Area: Algorithms & Data Structures · Ages 16 to 18
Page: https://lightmysky.com/learn/computing/linked-lists-and-nodes-that-point-mt_HvY7_-M2Zj

## Ready when they can

- Draw the pointer changes needed to insert and to delete a node in the middle
- Compare the cost of insertion and of access for a linked list and for an array
- Say what a null next reference marks and what happens if it is lost

## Lesson: Chains made of pointing nodes

A linked list stores a sequence as nodes, and each node holds a value plus a next reference pointing at the node after it, like paper clips hooked in a chain. An array reaches its five hundredth item by arithmetic on the index, but a list has no index to compute with. Reaching the fifth node means starting at the first and following next references one by one. The final node points at null, which marks the end of the chain.

**Example.** Picture a linked list holding 1 through 7 in order. To insert a new node between 3 and 4 you change exactly two pointers: the new node points at 4, then node 3 swings its next reference onto the newcomer. To delete node 4 you make one change the other way: node 3 skips over it and points straight at 5. An array insertion would shift every later item along, so pointer surgery is the list answer to shifting.

Costs cut opposite ways. List insertion is two pointer changes but access walks node by node, while array access jumps by index but insertion shifts everything after it. So this arrangement makes insertion cheap and access expensive. If a next reference is lost before its time, every node past the break is stranded with no way to reach it.

**Tip.** Draw four nodes, insert a value after the second node, and guard each pointer before you swing it. Set the newcomer pointing first, then swing the predecessor across. Never drop the only reference to the rest of the chain, or the tail floats away unreachable.

**Recap.** Two pointer changes to insert, one walk per access.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Queues: First In, First Out](https://lightmysky.com/learn/computing/queues-first-in-first-out-mt_4U1bT0JW4g)
- [Big-O Notation and Orders of Growth](https://lightmysky.com/learn/computing/big-o-notation-and-orders-of-growth-mt_mkqgxhJ509)

## Opens up

- [Trees and Binary Search Trees](https://lightmysky.com/learn/computing/trees-and-binary-search-trees-mt_7PGHiAY54b)
- [Hash Tables and Near-Constant Lookup](https://lightmysky.com/learn/computing/hash-tables-and-near-constant-lookup-mt_7v94MJEdmJ)
