Please code each one in C++: Add a node at the beginning of a LLL Add a node at
ID: 3659213 • Letter: P
Question
Please code each one in C++: Add a node at the beginning of a LLL Add a node at the end of a LLL Add a node AFTER the first node in a LLL Add a node right BEFORE the last node in a LLL Display the first node in a LLL Display the second node in a LLL Display the first two nodes in a LLL Display just the last node in a LLL Display all nodes in a LLL Display every other node in a LLL starting with the first node Display all BUT the last node in a LLL Display all BUT the first node in a LLL // Removing Remove at the beginning Remove the first two nodes Remove the last node Remove ALL NODES //Other Count the number of nodes in a LLL Add all of the data together in a LLL of integers Add the first and last data item together in a LLLExplanation / Answer
1)Adding a node at begining og LLL::: Sample insertion:: struct node { char name[20]; int id_num; node *nextadd; }; void insert(node **); //function prototype Code to insert the node at the end of present code:: void insert(node **list) // pointer to a structure { node *newrec = new node; coutnextadd = NULL; if( list== NULL) *list = newrec; else { newrec->nextadd = *list; *list = newrec; } }Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.