From the head
2. (5 points) Given the following recursive algorithm, draw the recursion tree for the call FOO(4).
Algorithm 1
Recursive Algorithm 1:
Algorithm Foo(n)
2: if n ≤ 1 then
3: return 1
4: else return Foo(n − 1) + Foo(n − 2)
end if
from the hend
2.5 points Given the following recursive algorithm, draw the recursion tree for the call Foo4.
Algorithm 1
Recursive Algorithm 1:
Algorithm Foon
2: if n1 then
3: return 1
4: else return Foon-1 + Foon-2
end if