LeetCode 61: Rotate List

Let’s solve LeetCode problem 61: Rotate List. The instructions are as follows: Given the head of a linked list, rotate the list to the right by \(k\) places. Constraints: The number of nodes in the list is in the range [0, 500] -100 <= Node.val <= 100 0 <= k <= 2 * 10^9 Let’s dive in! Recalling array rotations In a recent post, I solved this exact problem for arrays (LeetCode problem 189). The method was a triple-reversal procedure: ...

January 2, 2026 · 5 min · David Nabergoj