src/com/michaelho/DynamicProgramming/DP1.java
/**
         * The recursive method used to calculate Fibonacci numbers. This method
         * is inefficient in runtime, which is O(2^N).
         *
         * @param x The number to be calculated Fibonacci numbers.
         * @return int The results of calculation.
         * */
The recursive method used to calculate Fibonacci numbers. This method
is inefficient in runtime, which is O(2^N).

@param x The number to be calculated Fibonacci numbers.
@return int The results of calculation.
The recursive method used to calculate Fibonacci numbers . This method is inefficient in runtime which is O ( 2^N ) . @param x The number to be calculated Fibonacci numbers . @return int The results of calculation .
int count(int x) {
            if (x == 0) {
                return 0;
            } else if (x == 1) {
                return 1;
            }
            return count(x-1) + count(x-2);
        }
int count ( int x ) { if ( x == 0 ) { return 0 ; } else if ( x == 1 ) { return 1 ; } return count ( x - 1 ) + count ( x - 2 ) ; }
The recursive method used to calculate Fibonacci numbers.
The recursive method used to calculate Fibonacci numbers .