Question: Question 3 Marks 2 5 Linked - list is a collection of nodes which contain data elements as well as the information about where the

Question 3
Marks 25
Linked-list is a collection of nodes which contain data elements as well as the information about where the next element in the list stored. Each element is stored using a node format, which contains two fields: data and link. Data field contains the information and the Link field contains a pointer to the next element in the list as shown in Figure Q.3.
Answer the following questions
(i). Define a function named a newlist to create a new empty linked list.
[5 Marks]
(ii). Define a function named a sizelist to return the size of a given linked list.
[5 Marks]
(iii). Define a function named a displaylist to display the content of all nodes of a given linked list.
[5 Marks]
(iv). Define a function named an addnodeHead to add a new node on the head of a given linked list.
[5 Marks]
(v). Define a function named a removenodeTail to delete a tail node of a given linked list.
[5 Marks]
6
 Question 3 Marks 25 Linked-list is a collection of nodes which

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!