Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can u please answer these questions just by giving (a or b or c or d) without explaining 6. What is the recursive equation of
can u please answer these questions just by giving (a or b or c or d) without explaining
6. What is the recursive equation of the algorithm given below Int funX(int n) 13. What is the recursive equation of algorithm given below int funx(int n, int x) if(n==0) return 1; { if(n==1) return 1; if(n==1) return x; else return n + funX(n-1); if ((n % 2) == 0) return funX(n/2, x*x); } else 1. What is the running time of algorithm given below int funx(int n, int x) return funX(n/2, x*x) * x; a) T(n)=0(1)+T(n/2) b) Tn)=+T(n-1). c) None d) T(n)=O(1)+T(n-1) Leave it blank if (n==0) return 1; if (n==1) return x; a) T(n) = n + T(n/2) b) T(n) = 0(1) + T(n/2) C) T(n) = n + T(log n) d) T(n) = 0(1) + T(log n) if ((n % 2) == 0) return funX(n/2, x*x); else return funX(n/2, *x) * x; 15 - Assume that you have a single linked list which is not sorted. There is a pointer to the head and a pointer to tail of the linked list. Which of the given operations can not be implemented in unit time? a) T(n) = O(n log n) b) T(n) = O(log n) C) T(n) = (n) d) T(n) = (n) a) Inserting to the tail of linked list b) Deleting the head of the linked list c) Deleting the tail of the linked list d) Inserting to the head of linked list 4. If elements "X" "Y" "Z" are placed in a Stack and deleted one at a time what will be de order of deletion? a) XYZ b) ZXY Leave it blank *12099Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started