Question: Q1. Algorithms Course Question 1.) (12 pts) Determine the time complexities of the following using Big-O notation and select the appropriate answer. A.) O(n) B.)

Q1. Algorithms Course

Q1. Algorithms Course Question 1.) (12 pts) Determine the time complexities of

Question 1.) (12 pts) Determine the time complexities of the following using Big-O notation and select the appropriate answer. A.) O(n) B.) O(Ign) C.) O(n) D.) 0(n) E.) O(n-lgn) F.) 0(2) G.) O(3") H) 0n!) I.) O(lgan) J.) O(nlgn) a) fl (n) { if n == 1 return 1; else for il ton print i return flin-3) + 1 (n-3); b.) 12 (n) { if n == 1 return 1; else for i=1 to n print i return f2 (n/2) + f2 (n/2); } f3 (n) { if ns1 return 1; else for 1=1 to n print i; return 2 * 13 (n-2); d.) 54 (n) { if noul return 1; else for i= 1 ton print i; return 2 * 14 (n/2); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!