Index of the maximum value

In this exercise, you must compute the index of the tab cell containing the biggest value.

For that, fill the indexOfMaximum() method. Its parameter is the array to explore. Should the array contain the searched value several times, you should return the index of the first occurrence.

To solve this exercise, you should sweep over the whole array. For each value, if it's bigger than the biggest value you saw so far, you must save this new champion and its position. You will thus need 2 extra variables; the initial value of the champion could be the value of the first cell.