Member-only story

How To Code Linked Lists (Programming Data Structures)

Chain values together

Steven Curtis
6 min readMay 20, 2023

Linked lists are extremely useful in programming, and function as a collection of elements.

The part that makes them linked is that each element points to the next.

This article has been written to help you out by explaining not only what makes the data type so special, but some of the key questions you might be asked in an interview or at school.

Terminology

Data structure: A way of formatting data

Head: The first (or parent, or root) node

Linked List: A linear collection of data elements, made up of a head node with zero or more connected nodes. The order of this list is given by pointers from each node to the next

Node: The basic unit of a data structure

Null Pointer: A pointer that does not point to anywhere

Pointer: An object that stores a memory address

Tail: The linked list, after the head

Key

We call each data point in a linked list a node. Each node has a pointer that points to another node.

--

--

No responses yet