Intuition The one core idea
A linked list is a chain of tiny boxes where each box carries a value and an arrow to the next box , and the only thing you hold from outside is the address of the first box. Everything else — walking, inserting, deleting — is just following arrows and re-pointing them, because there is no formula to jump straight to a box.
Before you can read a single line of the parent topic , you must own every word and symbol it quietly assumes. This page builds them in order , each one earning its place before the next arrives.
Everything starts here. When a program stores something, it lives in memory — think of memory as one long street where every house has a number painted on it. That number is called an address .
An address is just the house-number of a spot in memory. It is a plain integer like 1000 or 2048. When we say "a box lives somewhere in memory", we mean it sits at some address.
A linked list scatters its boxes at random house-numbers all over the street. The only way one box knows where its neighbour is, is by storing that neighbour's address . So "address" is the atom under everything that follows.
Now that we have addresses, we need a way to hold one.
Definition Pointer (a.k.a. reference)
A pointer is a value that is an address — a slip of paper on which you've written the house-number of another box. Following a pointer means "go to the house whose number this is."
See the arrows in the figure below: an arrow is a pointer drawn as a picture. The tail is where the paper lives; the head is the house it names.
Read more in Pointers and References .
Intuition Why the topic needs it
The parent's next field is exactly a pointer. Without the idea "a box can hold the address of another box", the whole "boxes stitched by arrows" picture is impossible.
Every chain must end. We need a special value meaning "there is no next house."
null (also None in Python)
==null== is a pointer that deliberately points to nothing . On our street it is a slip of paper that says "no house — this is the end." In diagrams we draw it as an arrow into a small ground symbol (⏚) or an empty crossed box.
null means zero data
Why it feels right: "empty, so it's like the number 0." Why wrong: null is about the pointer , not the data. A node can hold the value 0 and still have next = null. One is the treasure, the other is "no next card." Fix: read null as "no address to follow" .
Now we combine a value with a pointer. This is the parent's Node.
A node is a small record with two labelled slots:
data — the value you store (a number, a letter, anything).
next — a pointer to the next node, or null if there is none.
Picture a box split into two halves: left half prints the treasure, right half holds an arrow.
this shape and not just an array?
An array packs values side by side so it can compute where item i is (base + i*size). A node gives that up: it holds no neighbours' positions except one — its immediate next. That single stored arrow is what lets boxes live scattered anywhere.
You never hold all the nodes. You hold one pointer.
head
==head== is a pointer kept outside the chain that names the first node. It is the front door. From head you can reach every node by following arrows; without it, the whole chain is unreachable and lost.
head with the first node's data
Why it feels right: "head is the front, so it's the first value." Why wrong: head is a pointer (an address), not the value inside the first box. head.data is the value; head alone is "where the first box is." Fix: head is a paper slip, not a treasure.
To do anything you slide a finger along the arrows.
cur (current) and prev (previous)
cur is a temporary pointer marking the box you are looking at right now .
prev is a pointer trailing one box behind cur.
Picture two fingers on the treasure hunt: cur on the card you're reading, prev resting on the card just before it. You need prev for deletion, because a singly list cannot look backward on its own.
The move cur = cur.next means: overwrite my finger's position with the address the current box points to — i.e. hop forward one box.
The parent writes O ( n ) , O ( 1 ) , O ( k ) . Here is what those shapes mean.
n
n is simply the number of nodes currently in the list. It is a count, nothing more.
Definition Big-O — the growth shape
O ( ⋅ ) describes how the work grows as n grows , ignoring constants.
O ( 1 ) — a fixed amount of work, no matter how long the list. (Re-point two arrows: same effort for 5 or 5 million nodes.)
O ( n ) — work grows in step with the list. (To reach the end, you touch every box once.)
O ( k ) — work grows with k , the position you stop at (you took k hops).
Full detail in Big-O Notation .
Intuition Why the topic leans on Big-O
The entire selling point of a linked list is the trade: insert-at-head is O ( 1 ) (cheap forever) but jump-to-index is O ( n ) (you must walk). Without Big-O you cannot state why you'd ever choose a linked list over an array.
The parent's code uses Python object syntax. The bare minimum:
class, self, __init__
class Node: — a blueprint for making boxes of the same shape.
__init__ — the setup recipe that runs when a new box is born; it fills the slots.
self — the word meaning "this particular box "; self.data = this box's data slot.
Reading self.next = None as "when a fresh node is born, its arrow starts pointing at nothing" is all you need.
cur and prev walking fingers
Everything on the left is a prerequisite ; the arrows show what must be understood before the box it feeds. The parent topic lives in the bottom-right node — you now have every arrow leading into it.
Mnemonic Address → Pointer → Node → Chain
"A number, on a slip, in a box, makes a chain."
A house-number (address) written on a slip (pointer), stored inside a box (node), linked box-to-box, is the whole linked list.
Test yourself — read the left, answer before revealing the right.
What is an address in memory? The house-number of a spot in memory — a plain integer identifying where a value lives.
What is a pointer (reference)? A value that holds an address; following it means "go to the box at that house-number." Drawn as an arrow.
What does null / None mean, and what does it not mean? A pointer to nothing ("no next box"). It does NOT mean the data is zero.
What two slots does a node have? data (the value) and next (a pointer to the next node, or null).
Why can't a node behave like an array element? An array computes positions with base + i*size; a node only stores one neighbour's address, so nodes may scatter anywhere and you must follow arrows.
What is head and why is losing it fatal? The external pointer to the first node — the only entry point. Lose it and the whole chain becomes unreachable garbage.
What do cur and prev represent while walking? cur = the box you're on now; prev = the box one step behind (needed for deletion since singly lists can't look backward).
What does cur = cur.next physically do? Moves your finger to the box whose address the current box's next slot holds — one hop forward.
What is n ? The number of nodes currently in the list.
What do O ( 1 ) and O ( n ) mean? O ( 1 ) = fixed work regardless of list length; O ( n ) = work grows in proportion to the number of nodes.
What does self mean inside a class method? "This particular object" — self.data is this node's data slot.
Next, once these are solid: return to the parent topic , and later compare against a Doubly Linked List , a Stack using Linked List , and a Queue using Linked List .