(int n)
| 37 | |
| 38 | //calculate nth term in fibonacci |
| 39 | public static int fib(int n) { |
| 40 | if(n == 0 || n == 1) { |
| 41 | return n; |
| 42 | } |
| 43 | int fnm1 = fib(n-1); |
| 44 | int fnm2 = fib(n-2); |
| 45 | int fn = fnm1 + fnm2; |
| 46 | return fn; |
| 47 | } |
| 48 | |
| 49 | public static boolean isSorted(int arr[], int i) { |
| 50 | if(i == arr.length-1) { |
nothing calls this directly
no outgoing calls
no test coverage detected