Reverse a linked list
Anonymous
reverse without recursion: Node*reverse(Node *root){ Node* prev=NULL,*current=root; while(current){ tmp = current->next; current->next = prev; prev = current; current = tmp; } }
Check out your Company Bowl for anonymous work chats.