• + 0 comments

    DoublyLinkedListNode* reverse(DoublyLinkedListNode* llist) { DoublyLinkedListNode *curr; curr=llist; while(curr->next!=NULL){ curr=curr->next; } DoublyLinkedListNode *head; head=curr; DoublyLinkedListNode *temp; DoublyLinkedListNode *count=NULL; while(curr!=NULL){ temp=curr->prev; curr->next=temp; curr->prev=count; count=curr; curr=temp;

    }hhere is three poimter approach

    return head; }