Blind 75 Linked List Questions
6 problems · Free practice
Linked list problems reward careful pointer bookkeeping. Before changing a next pointer, decide which nodes you still need to reach. Dummy heads simplify changes near the front, while fast and slow pointers can find a midpoint or detect a cycle without storing every visited node.
Practice linked lists
Reverse Linked List
EasyReverse a singly linked list by changing its next pointers and return the new head. The list may be empty.
Merge Two Sorted Lists
EasyCombine two ascending singly linked lists into one ascending list by relinking their nodes. Either input may be empty.
Reorder List
MediumRearrange a singly linked list in place so its nodes alternate from the front and back: first, last, second, second-last, and so on. Keep node values unchanged.
Remove Nth Node From End of List
MediumRemove the nth node counted from the end of a singly linked list and return the new head. Assume 1 ≤ n ≤ the list length.
Linked List Cycle
EasyDetermine whether repeatedly following next pointers in a singly linked list can revisit a node. Compare node identity, not values.
Merge K Sorted Lists
HardMerge k ascending singly linked lists into one ascending list. Inputs may contain empty lists.
What to focus on
- Draw a short list and label every pointer before modifying links.
- Save the next unprocessed node before reversing a connection.
- Test empty lists where allowed, a single node, and changes that remove the head.