struct Node* reverseList(struct Node *head) { if(!head or head->next==NULL) { return head; } Node* chotahead=reverseList(head->next); head->next->next=head; head->next=NULL; return chotahead; }
struct Node* reverseList(struct Node *head) { if(!head or head->next==NULL) { return head; } Node* chotahead=reverseList(head->next); head->next->next=head; head->next=NULL; return chotahead; }