Question: Write down the recurrence, which denes the running time of the following algorithm and solve it using any method you like. Justify your answers. 1

Write down the recurrence, which denes the running time of the following algorithm and solve it using any
method you like. Justify your answers.
1: function SillyRecursion(n)
2: if n <2
3: return 1
4: else
5: x =0
6: for i =1 to 2
7: x = x + SillyRecursion(n/2)
8: for i =2 to n
9: for j =1 to i 1
10: x = x +1

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!