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
Marks
Linkedlist 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
Answer the following questions
i Define a function named a newlist to create a new empty linked list.
Marks
ii Define a function named a sizelist to return the size of a given linked list.
Marks
iii Define a function named a displaylist to display the content of all nodes of a given linked list.
Marks
iv Define a function named an addnodeHead to add a new node on the head of a given linked list.
Marks
v Define a function named a removenodeTail to delete a tail node of a given linked list.
Marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
