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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started