Skip to main content

Practice ยท 2 of 4

Index of the maximum

CHALLENGE
Difficulty: beginner+25 XP

Implement static int MaxIndex(int[] values) โ€” the **index** of the largest element. Ties resolve to the *first* occurrence. Null or empty returns -1.

Back to lesson: Practice: Array workout