Question: in C code plz 1. The structure of each node of a singly linked list is shown below. typedef struct node { int data; struct
1. The structure of each node of a singly linked list is shown below. typedef struct node \{ int data; struct node next; \} node; Write a function insertAfterN, that takes the head of a linked list, and two integers M and N(M=N) and inserts M after all the nodes containing N. For example, if M=200 and N=6, the linked list 3,6 , 4,6,6,5 will be changed to 3,6,200,4,6,200,6,200,5. void insertAfterN(node* head, int M, int N )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
