Write a recursive method that takes 3 parameters an integer
Write a recursive method that takes 3 parameters: an integer array a, and two integers first and last. The method will find the largest value in a between indices first and last, inclusive. That is, it will return the largest value in the part of the array a[first..last] . You may assume that first <+ last.
In psudocode for java
Solution
MaxTest.java
 public class MaxTest {
   public static void main(String[] args) {
        int a[] = {1,2,3,11,5,6,7,9,8};
      System.out.println(\"Max Value is \"+findMax(a, 5,8));
    }
    public static int findMax(int[] a, int start, int last) {
    if (start < last) {
    return Math.max(a[start], findMax(a, start+1, last));
    } else {
    return a[start];
    }
    }
 }
Output:
Max Value is 9

