All Questions
1 question
15
votes
3
answers
1k
views
Time complexity for a very complicated recursion code
I have some problem while trying to calculate time complexity for this code:
function foo (int a):
if a < 1:
return 1
else:
for i = 1 to 4:
foo(a - 3)
...