Problem statement
Given a non-empty array of integers, return its smallest value.
When the smallest value appears more than once, the visualizer keeps its first index.
Examples
Inputa = [6, 2, 8, 4, 5]
Output2
The smallest value appears at index 1.
Inputa = [3, 0, 7, 0, 4]
Output0
The repeated minimum is still zero.
The walkthrough is part of Premium
The statement and the examples above stay free. The full how-to-solve walkthrough, the cost notes in plain words and the interactive step-by-step visualizer unlock with a Premium plan.
See pricing