(int arr[], int key, int i)
| 70 | } |
| 71 | |
| 72 | public static int lastOccurence(int arr[], int key, int i) { |
| 73 | if(i == arr.length) { |
| 74 | return -1; |
| 75 | } |
| 76 | int isFound = lastOccurence(arr, key, i+1); |
| 77 | if(isFound == -1 && arr[i] == key) { |
| 78 | return i; |
| 79 | } |
| 80 | |
| 81 | return isFound; |
| 82 | } |
| 83 | |
| 84 | public static int power(int x, int n) { |
| 85 | if(n == 0) { |
nothing calls this directly
no outgoing calls
no test coverage detected