Recursively reverse a singly linked list.
Anonymous
Just gave this a shot. void reverse(Node node, Node previous){ Node next = node->next; node->next = previous; //point to previous node if(next != null) { reverse(next, node); } }
Check out your Company Bowl for anonymous work chats.