Solving recursive problems

    Solve one of the followin" rel="nofollow">ing three recursive problems:1. Ackermann's function is a recursively-defin" rel="nofollow">ined function where computin" rel="nofollow">ing a value requires computation of a simpler case of the function. It is formally defin" rel="nofollow">ined as a function on two values A(m, n), as follows:A(m, n) = n + 1 if m = 0  A(m - 1, 1) if m > 0 and n = 0  A(m - 1, A(m, n - 1)) if m > 0 and n > 02. Write a Java function to compute Ackermann's function given m and n. Note: the results get too large to compute with even small values of n and m. Try A(2, 3) = 9 or A(3, 2) = 29.or3. Write a recursive method that will calculate and return the range of values in" rel="nofollow">in an array. The range is defin" rel="nofollow">ined as the maximum value in" rel="nofollow">in the array min" rel="nofollow">inus the min" rel="nofollow">inimum value. Hin" rel="nofollow">int: you will need a different approach than the solution to problem 2, because you need to calculate both the min" rel="nofollow">inimum and maximum values, and a method can have only one return value.or4. Write a recursive method that will fin" rel="nofollow">ind whether or not a particular substrin" rel="nofollow">ing occurs in" rel="nofollow">inside another (like in" rel="nofollow">indexOfexcept with a boolean return value). For example, searchin" rel="nofollow">ing "water" for "ate" returns true, but searchin" rel="nofollow">ing "water" for "war" returns false. Here's the catch: you can only use the Strin" rel="nofollow">ing charAt and length methods . Also, be careful, because if you search "array" for "ra", the answer is true (don't get caught up lookin" rel="nofollow">ing only at the first "r"). If you like you can have one recursive method that calls another recursive method.