I have a method called "indexOfMaxInRange", and I built most of the code, but, I feel like something is off. The goal is to traverse an array, and return the index of highest element in the array. Here is the code
public static int indexOfMaxInRange(int[] a,int low, int high)
{int[] count=a;int index=0;
for(int i=0;i<count.length;i++)
{if(a[i]>low&&a[i]<high)index++;}
return index;}
I have things set up, for the most part, I feel like there just needs to be more polishing, and a few edits in the code. Any suggestions?