about | help | code help+videos | done | prefs |
Write a method that returns the INDEX of the maximum value found in the array. The array will contain at least one element. If there is a tie for the maximum value, return the INDEX of the FIRST occurance of the maximum value. findMaxIndex([4, -5, 6, 20, -40, 10, 3, 0]) → 3 findMaxIndex([8, 8, 8, 8]) → 0 findMaxIndex([-7, -3, 0, -2]) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 420
Copyright Nick Parlante 2017 - privacy