TheAlgorithms-C/leetcode/src/509.c

8 lines
120 B
C
Raw Normal View History

2019-09-26 23:29:31 +08:00
int fib(int N){
if(N == 0)
return 0;
if(N == 1)
return 1;
return fib(N - 1) + fib(N - 2);
}