Skip to content

Instantly share code, notes, and snippets.



Created Mar 4, 2019
What would you like to do?
Reverse a linked list in C
while (current != null) {
next = current->next;
current->next = prev;
prev = current;
current = next;
head = prev;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment