Question: JAVA!!!! Get the max/min element of 1D array class Test{ public static void main(String[] args){ float[] array0 = { 0, 1, 2, 3, 4, 5,
JAVA!!!!
Get the max/min element of 1D array class Test{ public static void main(String[] args){ float[] array0 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 }; float[] array1 = { 6, 7, 9, 2, 3, 6, 3, 2, 1, 9, 4 }; } }
Try to find the index of max in array0 and array1
INCLUDE PSEUDO CODE:
int findMax( int[] arr){ // iterating whole array
// keep tracking the max element index and value of array
// return the index of largest element }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
