Question: Qu 1 : The following algorithms are for the operations of a Singly Linked List, L . It is assumed that the list has 2
Qu : The following algorithms are for the operations of a Singly Linked List, It is assumed that the list has attributes, head and tail referencing the first and last node respectively. Each node of the list is assumed to have attributes. info. and next referencing the data item in the node and the next node respectively.
il
For each of the algorithms, use the provided table to perform a linebyline analysis and then answer each of the following questions:
i Find the general running time function, where is the number of elements in the list.
ii Explain the worst case scenario or explain why there is no bestworst case scenario
iiiFind the worstcase running time. If there is no worst case, find the running time for any of the possible scenarios.
iv Write the running time you find in iii above using notation.
You may assume that the running time of all basic operations is constant.
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
