JupiteX Get the app
Science & Technology28 Nov 2026 · about 6 min

Linked Lists: Dynamic Memory and the Power of Pointers

The brief

A linked list is a linear structure made of nodes that can sit at scattered memory locations. Each node stores two things: its data, such as a number, and a pointer called Next. That pointer gives the memory address of the next node, linking the items into a sequence. For example, a list might be 10 → 20 → 30. The node containing 10 points to the node containing 20, and the node containing 20 points to the node containing 30. The final node points to null, which marks the end. The list’s head points to its first node. This structure matters when items need to be inserted or deleted without shifting other items. Adding a node can mean changing pointers rather than moving values. The trade-off is that linked lists do not offer direct access by position: to reach a later item, you follow the chain from the head.

01

What is a linked list, and what information does each node store?

A linked list is a linear structure made of nodes that can sit at scattered memory locations. Each node stores two things: its data, such as a number, and a pointer called Next. That pointer gives the memory address of the next node, linking the items into a sequence.

For example, a list might be 10 → 20 → 30. The node containing 10 points to the node containing 20, and the node containing 20 points to the node containing 30. The final node points to null, which marks the end. The list’s head points to its first node.

This structure matters when items need to be inserted or deleted without shifting other items. Adding a node can mean changing pointers rather than moving values. The trade-off is that linked lists do not offer direct access by position: to reach a later item, you follow the chain from the head.

02

How do a node’s pointers connect items that are stored in different places in memory?

Nodes in a linked list do not need to sit beside one another in memory. Instead, each node’s Next pointer stores the memory address of the node that follows it. In general computer terminology, a pointer is a value that refers to a memory address; the article describes it as the address of the next node.

In the example list, the node holding 10 points to the node holding 20, which points to the node holding 30. Following those addresses reconstructs the list’s order. The last node has a null pointer, so there is no next node to visit.

This design avoids relying on contiguous memory and supports insertion by updating links. But it also means you cannot jump straight to a position as you can with an array. To reach a particular node, you must start at the head and follow pointers along the chain.

03

When inserting a node between two others, how many pointer updates are needed once you have found the right place?

Once you already have a reference to the node before the insertion point, inserting between two nodes takes two pointer updates. That is O(1) work, regardless of how many other nodes are in the list. The key is that linked lists connect nodes with pointers, so insertion does not require shifting later elements.

For example, to place 25 between 20 and 30, create a node for 25. Set its next pointer to the node containing 30, then set the node containing 20 to point to the new node. The chain becomes 10 → 20 → 25 → 30.

The constant-time claim applies only after the predecessor is known. If you must locate it by starting at the head, finding it can take O(n) time. So the list makes the pointer changes quick, but not necessarily the whole task of inserting at an arbitrary position.

04

Why can deleting a node make it unreachable, and what happens to it afterward?

Deleting a node from a linked list works by changing a link. If a node has a predecessor, update the predecessor’s next pointer to point to the node after the one being deleted. The list’s chain then bypasses the target node, so it can no longer be reached by following links from the head.

For example, if the list is 10 → 20 → 30 and 20 is removed, set the node containing 10 to point to the node containing 30. The reachable chain becomes 10 → 30. The node containing 20 is no longer part of that chain.

The article says the skipped node becomes unreachable and gets garbage collected. Deleting the first node is a special case: move the head forward to the next node. These operations show why deletion can avoid shifting other elements, though finding a target by value may take O(n) time.

05

When is a linked list a better choice than an array, and when is an array better?

A linked list is a good fit when the size is unknown, insertions or deletions happen often, and random access is unnecessary. Once you have the predecessor, inserting a node requires pointer updates rather than shifting later values. The article also notes that reaching a position requires traversal from the head.

Arrays suit a different need: direct access to an item by its position. As general data-structure knowledge beyond the article, arrays provide efficient indexed access because items occupy a contiguous sequence. The article highlights their downside: inserting into a sorted array can require shifting elements, which takes O(n) time.

So the choice depends on the work a program does most. Favor a linked list when flexible size and frequent updates matter more than jumping to an index. Favor an array when indexed access matters and its fixed-size or shifting limitations are manageable. Neither structure is best for every task.

06

As a list grows, how does the time for traversal compare with insertion when the predecessor is already known?

Traversal and insertion scale differently in a linked list. To visit every node, start at the head and follow each next pointer until reaching the end. The article gives traversal a time cost of O(n), so the work grows with the number of nodes.

Insertion between two nodes is different if you already have a reference to the predecessor. You create the new node and update two pointers to connect it into the chain. Those changes take O(1) time, whether the list is short or long. For example, placing 25 between 20 and 30 needs no shifting of other nodes.

The condition matters: if you first need to search for the predecessor, locating it may take O(n). So as a list grows, a full traversal becomes longer, while the pointer updates for insertion remain constant-time once the right node is in hand. The article’s distinction is between finding a place and changing the links.

07

What is a pointer as a computer concept, and why is the head pointer essential for reaching a linked list?

In general computer terminology, a pointer is a value that refers to a memory address. The article uses pointers to connect nodes: each node stores the address of the next one. This lets a linked list form an ordered chain even though its nodes are stored at scattered memory locations.

The head is the reference to the first node. To traverse the list, begin there, read the current node’s data, and follow its next pointer. In the article’s example, the chain starts at 10 and continues through 20 and 30 until the final node points to null.

Without the head, the described traversal has no starting node from which to follow the links. This is why the head is a key part of the list structure, not just another node. It supports access to the chain, while the links provide the route through it; reaching a later position still requires following that route node by node.

This brief was written by AI from the original reporting and checked by other models. Names, figures and quotes come from the source; read it for full context.

Read more in the JupiteX app

Pulse is free. New stories every 4 hours, each one broken into the questions that explain it.

Or read more news on the web