• + 16 comments

    Recursion usually provides an elegant solution to these types of problems but in this case, it did not appear to have anything over simple iteration:

    Node* Reverse(Node *head)
    {
        Node *tail, *t;
        tail = NULL;
        while (head != NULL) {
            t = head->next;
            head->next = tail;
            tail = head;
            head = t;
        }
        return tail;
      // Complete this method
    }