fibonacci.c
int fibonacciRecursive(int element)
{
    if((element == 0) || (element ==1))
    {
        return element;
    }
    return fibonacci(element-1) + fibonacci(element -2);
}
//This repeats calculations making it non-efficient.  Factorial is a better example of recursion  n*fact(n-1)
This repeats calculations making it non-efficient.  Factorial is a better example of recursion  n*fact(n-1)
This repeats calculations making it non - efficient . Factorial is a better example of recursion n * fact ( n - 1 )
int fibonacciRecursive(int element)
{
    if((element == 0) || (element ==1))
    {
        return element;
    }
    return fibonacci(element-1) + fibonacci(element -2);
}
int fibonacciRecursive ( int element ) { if ( ( element == 0 ) || ( element == 1 ) ) { return element ; } return fibonacci ( element - 1 ) + fibonacci ( element - 2 ) ; }
This repeats calculations making it non-efficient.
This repeats calculations making it non - efficient .