DrawCode
Reverse Linked List
Given the head of a singly linked list, reverse the list and return the new head. (Implement `reverse_list(head)` where each node has `.val` and `.next`.)
Browse free without an account. Sign in to save progress, sync likes, and open your canvas workspace.