Skip to main content

Practice ยท 1 of 2

Reverse a linked list iteratively

Implement ListNode* reverse_list(ListNode* head) reversing the chain in place with the three-pointer technique (prev, head, next) and returning the new head. ListNode is {int value; ListNode* next;}. No new nodes โ€” relink the existing ones.

Difficulty: intermediate

Back to lesson: Practice: Structure practice