Problem
Rewrite well-known "find minimum in array method", replacing the loop with recursion.
a) Do not use any global variables. Pass any data needed for the next method call through parameters.
Method header: public static int recFindMin(int[] array, int current, int minLocation)
a) current - the starting index of the "unvisited" part of the array
b) minLocation - index of the minimum element in the "visited" part of the array ([0, current-1])
c) method returns the index of the minimum element in the part of the array from index 0 to index current ([0 - current])
Write a "wrapper" method findMin(int[] a) that calls on the recursive recFindMin() method. The only purpose of it is to provide the expected find minimum method signature and hide additional parameters of the recursive method. findMin(int[] a) returns index of the smallest element of the array.
Requirement: Your method must not use any global variables or fields. Only local variables can be used in the method implementation.