C CODE NEED HELP WITH PART B: CODE FOR PART A IS PROVIDED.PLEASE COMMENT
#include <stdio.h>#include <stdlib.h>
// struct for node..
// note: Node is a component of list
typedef struct Node {
int data;
struct Node *next;
} Node;
// struct for list
// Note: a list contains multiple nodes
typedef struct List {
Node *head;
} List;
// create a node of list
Node *createNode() {
return malloc(sizeof(Node));
}
// create a new list dynamically
List *createList() {
List *result = malloc(sizeof(List));
// list has no node in start, so
OR
OR