• + 2 comments
    void ReversePrint(Node *head){
        if(head==NULL) return;
        else{
            ReversePrint(head->next);
            cout<<head->data<<endl;
        }
    }
    

    C++ solution

    • + 1 comment

      how it works??

        -
      • + 0 comments

        It's through recursion, ex : 1->4->8->9 In this first the head will move till head is NULL and then returns control to the previous call then printing of the last ele is done then the control is returned to the previous call then printing of the last second ele and so on.

    • + 0 comments

      really...its a wonderful thought