Please write and explain clearly. Thanks!
Q4. (a) Explain the concept of a linked list data structure. Show, using diagrams, how the operations of node insertion and deletion are performed on a linked list. What are the advantages and disadvantages of this data structure over the array structure? (50%) (b) The listing below is for a linked list implementation in C. It includes function prototypes for three functions (list_initialise, insert after and delete next), plus the function definition for list initialise. Write code to implement the functions insert_after and delete next for this program. For maximum marks, comment your code liberally, #include #include typedef int key; typedef struct node Node; struct node Key key; Node *next; Node “head, *2; void list initialise (void); Node *insert_after (Node *, Key); Node delete_next (Node *); void list initialise() if ((head – (Node *) malloc(sizeof (Node))) = NULL 11 (z – (Node *) malloc(sizeof (Node))) = NULL) fprintf(stderr, “Failed to initialise listn”); exit (EXIT_FAILURE); head->next = 2; /* link the head node to the z node */ 2->next = z; link the z node to itself/ Node.insert after (Node current, Key data) TO BE COMPLETED BY THE CANDIDATE Node delete_next (Node *current) TO BE COMPLETED BY THE CANDIDATE (50%)

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now