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
| # | Problem | Difficulty | Video | AI round |
|---|---|---|---|---|
| 1 | Add Two Numbers | Medium | AI round | |
| 2 | Merge Two Sorted Lists | Easy | AI round | |
| 3 | Reverse Linked List | Very easy | AI round | |
| 4 | Merge k Sorted Lists | Hard | ||
| 5 | Reverse Nodes in k-Group | Hard | — | |
| 6 | Copy List with Random Pointer | Medium | ||
| 7 | Flatten Binary Tree to Linked List | Medium | — | |
| 8 | Swap Nodes in Pairs | Medium | AI round | |
| 9 | Reverse Linked List II | Medium | ||
| 10 | Odd Even Linked List | Medium | AI round | |
| 11 | Remove Duplicates from Sorted List | Easy | ||
| 12 | Remove Linked List Elements | Easy | ||
| 13 | Convert Sorted List to Binary Search Tree | Medium | — | |
| 14 | Delete Node in a Linked List | Medium | — | |
| 15 | Convert Binary Search Tree to Sorted Doubly Linked List | Medium | — |
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.
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 roundYour first AI round is free.