Question: Write two recursive methods. One to find the maximum in an array, the other to find the minimum. public class Lab14Num1 { public static void

Write two recursive methods. One to find the maximum in an array, the other to find the minimum.

public class Lab14Num1 { public static void main (String []args) { int A[] = {2,5,7,-4,6,3}; System.out.println(FindMax(A,5)); //n is the index of the last element in the array System.out.println(FindMin(A,5)); } public static int FindMax(int A[], int n) //n is the index of the last element in the array { } public static int FindMin(int A[], int n) //n is the index of the last element in the array { } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!