Question: Determine the time complexities of the following using Big-O notation and select the appropriate answer. A.) O(n) B.) O(lgn) C.) O( n 2 ) D.)
Determine the time complexities of the following using Big-O notation and select the appropriate answer.
A.) O(n) B.) O(lgn) C.) O(n2) D.) O(n3) E.) O(n2lgn)
F.) O(2n) G.) O(3n) H.) O(n!) I.) O(lg2n) J.) O(nlgn)

a) fi (n) { if n == 1 return 1; else for i=1 to n print i return fi (n-3) + fl (n-3); b.) f2 (n) { if n == 1 return 1; else for i=1 to n print i return f2 (n/2) + f2 (n/2); } f3 (n) { if n==1 return 1; else for i= 1 ton print i; return 2 * 3 (n-2); } d.) 54 (n) { if n==1 return 1; else for i= 1 ton print i return 2 # 4 (n/2); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
