Interview Preparation Kit/Recursion/recursion_fibonacci_numbers.cpp
// Implementation of a fibonacci function 
// by traversing the entire "tree"
Implementation of a fibonacci function
by traversing the entire "tree"
Implementation of a fibonacci function by traversing the entire " tree "
int fibonacci(int n) {
    if (n == 0) return 0;
    else if (n == 1 | n == 2) return 1;
    else return fibonacci(n - 1) + fibonacci(n - 2);
}
int fibonacci ( int n ) { if ( n == 0 ) return 0 ; else if ( n == 1 | n == 2 ) return 1 ; else return fibonacci ( n - 1 ) + fibonacci ( n - 2 ) ; }
Implementation of a fibonacci function
by traversing the entire "tree"
Implementation of a fibonacci function by traversing the entire " tree "