Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

fibonancci using dynamic programming in java

public class Fibonacci {
    public int fib(int n) {
        if (n <= 1) { 
            return n;
        } else { 
            return fib(n - 1) + fib(n - 2);
        }
    }
}
Source by www.javacodemonk.com #
 
PREVIOUS NEXT
Tagged: #fibonancci #dynamic #programming #java
ADD COMMENT
Topic
Name
7+9 =