Question: 2. In both cases (i), (ii) identify the value being computed, the number of recursive calls which take place, and give using big oh and
2. In both cases (i), (ii) identify the value being computed, the number of recursive calls which take place, and give using "big oh" and "big omega notation, two sided tight, i.e. optimal (not improvable), estimates of their running times. (i) function powerl (n: integer : integer; begin if n=0 then return (1) else return (powerl(n-1) + powerl(n-1) + powerl(n-1)) end; power/ (ii) function power2 (n: integer ): integer; begin if n=0 then return (1) else return (3 * power2(n-1)) end; (power2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
