You are viewing a single comment's thread. Return to all comments →
Node *node = head; Node *prev = head; while (node != NULL) { prev = node; node = node->next; prev->next = prev->prev; prev->prev = node; } return prev;
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a doubly linked list
You are viewing a single comment's thread. Return to all comments →