CJCoding With Joseph
15free / daySign inCreate account

Find the Index of the Smallest Value

NumberList owns an int array and its size. A working selectionSort() is already written, and it calls the one helper still missing.

Requirements:
1. Complete findMinIndex(int start): return the index of the smallest value in positions start through size() - 1.
2. On a tie, return the lower index.
3. Return -1 when start is not a valid index.

Do NOT write a main method.

Expected Output:

3
3
4
-1
List: 1 4 7 8 9

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Data Structures & AlgorithmsSorting
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.