You are viewing a single comment's thread. Return to all comments →
A slightly simplyfied version of the fucntion body:
auto node = head; if(head->next){ node = reverse(head->next); head->next->next = head; head->next = NULL; } return node;
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a linked list
You are viewing a single comment's thread. Return to all comments →
A slightly simplyfied version of the fucntion body: