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
Press Submit to check your solution.
Back to lesson: Practice: Structure practice