Question: ( 1 0 % ) Consider the function func as shown below, where the two lists list 1 and list 2 are both ordered in
Consider the function func as shown below, where the two lists list and list are both ordered in ascending order.
struct item
int value;
struct item next;
;
int func struct item list struct item list
struct item ptrptr;
int count ;
ptr list ;
ptr list;
while ptrl NULL &&&ptr NULL
if ptrlvalue ptrvalue
ptrl ptrl next;
else if ptrlvalue ptrzvalue
ptr ptr next
else
ptr ptr next ;
ptr ptr next ;
count ;
return count;
If and are the number of items in list and list respectively, what is the worstcase time complexity of funclist list
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
