We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f12d908 commit 3cdf7ceCopy full SHA for 3cdf7ce
509-fibonacci-number/509-fibonacci-number.java
@@ -0,0 +1,7 @@
1
+class Solution {
2
+ public int fib(int n) {
3
+ if(n == 0) return 0;
4
+ else if(n == 1) return 1;
5
+ else return fib(n - 1) + fib(n - 2);
6
+ }
7
+}
0 commit comments