Linked List

Work with nodes by rewiring their next pointers, often with a dummy head or a fast and slow pointer. Expect it whenever the input is a chain of nodes, as in Reverse Linked List. Done well, you reverse, merge or cut a list in one pass with no extra space.

15 problems · 10 with a video · 5 to practice in an AI round

Linked List problems
#ProblemDifficultyVideoAI round
1Add Two NumbersMediumAI round
2Merge Two Sorted ListsEasyAI round
3Reverse Linked ListVery easyAI round
4Merge k Sorted ListsHard
5Reverse Nodes in k-GroupHard—
6Copy List with Random PointerMedium
7Flatten Binary Tree to Linked ListMedium—
8Swap Nodes in PairsMediumAI round
9Reverse Linked List IIMedium
10Odd Even Linked ListMediumAI round
11Remove Duplicates from Sorted ListEasy
12Remove Linked List ElementsEasy
13Convert Sorted List to Binary Search TreeMedium—
14Delete Node in a Linked ListMedium—
15Convert Binary Search Tree to Sorted Doubly Linked ListMedium—

Practice in an AI round

Five of these are AI rounds: 30 minutes, an AI agent beside your code, then a scored report.

Practice Add Two Numbers in an AI round