Back to exercises

Reverse Linked List

Walk the list node by node, reverse each next pointer, and move the window forward until the list is exhausted.

Coding Exercises Easy O(n)

Reverse Linked List

Walk the list node by node, reverse each next pointer, and move the window forward until the list is exhausted.

Reverse a singly linked list and return the new head.