Sponsored
Use these hints if you're stuck. Try solving on your own first.
Starting with i=0, check the condition for each index. The first one you find to be true is the smallest index.
Solve with full IDE support and test cases