Question: Answer any 4 Questions each question is 1 5 Marks Qn 1 . ( a ) i . What is a linear list? ii .
Answer any Questions each question is Marks
Qn
a i What is a linear list?
ii Distinguish between linear list and circular linked list.
b With the aid of diagrams
i Write an algorithm to delete the Kth element in the list.
ii Write an algorithm to insert an element immediately after the th element.
c Using the Stack and the Queue structures explain the LIFO and FIFO principle in data management.
d Explain the statement "the time taken by an algorithm grows with the size of the input" marks
a What are the advantages of the data structure Queue? What type of data structure would you recommend for storing data?.
b With the help of diagrams explain the Heap data structure. Use that same diagram to explain
i max heap
ii min heap
c Draw a complete binary tree with exactly nodes. Put different values in each node. Then draw an array with elements and show where each of the node value would be placed in the array using the usual array representation of a complete binary tree
d Distinguish between the worstcase and the averagecase running time and the factors that affect the running time of an algorithm.
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
