Grokking Data Structures & Algorithms for Coding Interviews
Vote

0% completed

Introduction to LinkedList

A linked list consists of nodes that are connected sequentially. Each node contains:

  1. Data – The value stored in the node.
  2. Pointer (Next Reference) – A reference to the next node in the list.

A linked list always has a starting point (Head) and may have an ending point (Tail), depending on the type of linked list. If a node does not point to another node, its reference is set to NULL.

Key Components of a Linked List

1. Node

A node is the building block of a linked list. Each node consists of two parts:

.....

.....

.....

Like the course? Get enrolled and start learning!
G

growth.mindset.247365

· 11 hours ago

Need some clarification, you mentioned "The head is the first node of the linked list. It stores the reference to the first node." According to the diagrams the head doesn't have a value, but in the solutions the head is always the first node that has the value. How do you reconcile this?