Reverse Linked List — Iterative and Recursive
Reverse a singly linked list iteratively with three-pointer technique and recursively with call stack.
webcoderspeed.com
8 articles
Reverse a singly linked list iteratively with three-pointer technique and recursively with call stack.
Check if a linked list is a palindrome by finding the middle, reversing the second half, then comparing.
Swap every two adjacent nodes in a linked list without modifying node values using pointer rewiring.
Reorder a linked list into L0→Ln→L1→Ln-1 pattern by splitting at middle, reversing second half, then merging.
Reverse the portion of a linked list between positions left and right in one pass using careful pointer manipulation.
Find the maximum sum of twin nodes (node i + node n-1-i) by reversing the second half and comparing pairs.
Reverse nodes in each even-length group of a linked list by counting group sizes and selectively reversing.
Reverse every k nodes of a linked list recursively: check k nodes exist, reverse them, recurse on the rest.