Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. Consider the following C function.
    int fun(int n)
    {
        int x = 1, k;
       if (n = = 1) return x;
       for (k =1; k   x = x + fun(k) * fun(n–k);
       return x;
    }
    The return value of fun(5) is _____.
    1. 15
    2. 13
    3. 51
    4. None of these
Correct Option: C

Recurrence Relation is
f(n) = 1, if n = 1



Your comments will be displayed only after manual approval.