Question 10528 – Time-Complexity
February 13, 2024ISRO CS-2023
February 15, 2024Question 10494 – Time-Complexity
Consider the function F(n) for which the pseudo code is given below:
Function F(n) begin F1 ← 1 if(n=1) then F ← 3 else For i = 1 to n do begin C ← 0 For j = 1 to F(n – 1) do begin C ← C + 1 end F1 = F1 * C end F = F1 end [n is a positive integer greater than zero]
(a) Derive a recurrence relation for F(n)
(b) Solve the recurrence relation for a closed form solutions of F(n).
Correct Answer: A
Theory Explanation.
Subscribe
Login
0 Comments