Question: 1. What is the runtime complexity of the following program? int f(int i) { if(i == 0) return 0; if(i == 1) return 1: return

1. What is the runtime complexity of the following program? int f(int i) { if(i == 0) return 0; if(i == 1) return 1: return f(i-1)+f(i-2); } Pick ONE option 0(2N) ON*N) O(logN) O(N) Clear seation 12 C A machine needs a minimum of 100 sec to sort 1000 names by quicksort. What is the approximate worst-case time (In seconds) needed to sort 100namos? PONE option 10 100 6.6 33 Clear Selection 2. Question 2 T SG fe DO 8: ! 7 # 3 . 2 $ 4 UX | & 7 6 8 ) 0 9 Q W E R Y U 0 P A S D G HJ L N C > B N M A. T # -ol option comm command OF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
