8. Delete Node recursive #

Created Friday 17 January 2020

Node* deleteNodeRec(Node *head, int i) { if(head==NULL && i!=0) return head;

if(i==0) { if(head==NULL) return NULL;

Node* p = head->next; delete head; return p; }

head -> next = deleteNodeRec(head->next, i-1); }