Reverse a Linked List
Anonymous
if(Head == NULL) return; Node* current, prev, next; current = next = Head; prev = NULL; while(current) { next = current ->next; current -> next = prev; prev = current; current = next; }
Check out your Company Bowl for anonymous work chats.