Question: 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
can anyone write the source codes of this exercise Design the following

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!