Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to?
int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) + f(n); }
$ \large{\colorbox{yellow}{Detailed video solution of this question with direct time stamp}}$ All India Mock Test 2 - Solutions Part 2
$\color{Green}\text{Ans: 89}$
A base condition exploration approach could save some time :))
64.3k questions
77.9k answers
244k comments
80.0k users