->Topic

Linked List Problems

Linked-list problems — reversal, cycle detection, merge, reorder, and the runner / fast-slow pointer technique.

Easy · 3

Medium · 2

Linked lists are a perennial interview topic because they isolate one specific skill: confident pointer manipulation. The data structure itself is simple, but the problems demand careful attention to edge cases — empty lists, single nodes, cycles, and what happens when next pointers cross.

The two patterns to internalize are reversal (in-place reverse a sublist by walking three pointers) and fast-slow runners (one pointer moves twice as fast as the other). The runner pattern alone solves cycle detection, finding the middle node, the kth-from-end node, and palindrome checks. Pair it with reversal and you can reorder a list in-place, palindrome-check in O(1) extra space, and merge sorted lists without copying.

The Ratta linked-list track covers Reverse Linked List, Merge Two Sorted Lists, Linked List Cycle, Reorder List, Remove Nth Node From End, and Merge K Sorted Lists. Every solution is implemented in C++, Java, Python, and Go with explicit pointer-by-pointer commentary so you can follow exactly what each step is doing — no hand-waving.

Browse other topics