0206. Reverse Linked List
Easy | Linked List + Two Pointer | 16 ms (98.94%), 15.4 MB (80.06%)
Last updated
Was this helpful?
Easy | Linked List + Two Pointer | 16 ms (98.94%), 15.4 MB (80.06%)
Last updated
Was this helpful?
Source: GitHub:
Given the head
of a singly linked list, reverse the list, and return the reversed list.
We reverse the linked list by modifying the current node's next pointer to make it point to the previous node.