Question: Write a C function insertInOrder () for a dynamic singly linked list that has the following header: void insertInOrder (Node **pList, char *myData); The function
Write a C function insertInOrder () for a dynamic singly linked list that has the following header: void insertInOrder (Node **pList, char *myData);
The function should insert a node into reverse dictionary ordering ('z' - 'a') dynamically linked list, with the data value myData. Assume that struct node is defined as follows:
typedef struct node { char data[100]; //This will be used to store strings struct node *pNext; } Node;
You may NOT assume that a makeNode() function has been implemented for this function. Creat and initialize the new node inside of the insertInOrder() function. Your function must also check to see if the list is empty or not before it inserts the node.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
