# Linked List

A **linked list** is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence.

**In its most basic form, each node contains data, and a reference (in other words, a ***link*) to the next node in the sequence. This structure allows for efficient insertion or removal of elements from any position in the sequence during iteration.

## Basic Operations

The first type of question is about the basic operations of linked lists. including iteration, adding nodes, deleting nodes, etc. Some of the questions involve using a common trick in linked lists: the dummy node. (It is OK if you don't know what the dummy node is. When solving problems and reading solutions on LeetCode, you will definitely come across the concept of a dummy node.)

To solve problem 430, you need to apply recursive approach. Recursion is a commonly used concept, and we will encounter it in many places later on. The subsequent problems involving reversing a linked list can also be solved using recursion.

## Reverse Linked List

**Reverse the entire linked list**

**Reverse a part of linked list**

## Fast and Slow Pointer

Fast and slow pointer approach can be used to find the middle node of a linked list

In addition, it can also be used to detect if a linked list has a cycle.

Some problems that seem unrelated to linked lists can also be cleverly solved using the fast and slow pointer method for detecting cycles in linked lists.

## Liked List + Hash Table

1171 is a little bit challenging. It involves linked list and hash table.

## Doubly-Linked List + Hash Table

There is a type of problem that requires us to use both linked lists and hash tables. This approach allows us to take advantage of the fast lookup feature of hash tables and the quick deletion characteristic of linked lists.

## Not Intuitive

There is category of problems includes those that are difficult to solve during an interview if you haven't practiced them beforehand.