Problem

Return the index of the smallest value in a non-empty array (first min if tied).

Examples

  • indexOfMin([5, 2, 8, 2]) -> 1
  • indexOfMin([10]) -> 0
Compile and test (Ctrl+Enter)