Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can anyone write the source codes of this exercise Design the following functions to implement operations on singly linked lists: (1) InsertAtHead() : input a
can anyone write the source codes of this exercise
Design the following functions to implement operations on singly linked lists: (1) InsertAtHead() : input a positive integer n from keyboard, then read n ascending integers. Build a descending ordered singly linked list La with a header node using insertion at head method; Suppose input n=4, then input 2,5,7,8 from keyboard. Create a singly linked list La : (2) InsertAtTail() : input a positive integer m from keyboard, then read m ascending integers. Build an ascending ordered singly linked list Lb with a header node using insertion at tail method; Suppose input m=5, then input 1,3,6,8,10 from keyboard. Create a singly linked list Lb : (3) ReverseList() : reverse the descending singly linked list La to an ascending linked list in place; (4) MergeList(): merge the ascending linked lists of La and Lb to an ascending linked list Lc and display it on screen; (5) DelOdd() : delete all odd elements in Lc then display it. (6) PrintList(): output \& display the linked list, for example, H>1>3>6>8>10; You have to add a function main() to call the above functions 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