← Back to Data Structures & Algorithms
Question 429
Find the Index of the Smallest Value
Find the Index of the Smallest Value
NumberList owns an int array and its size. A workingselectionSort()is already written, and it calls the one helper still missing. Requirements: 1. CompletefindMinIndex(int start): return the index of the smallest value in positions start throughsize()- 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
Sign in to use hintsTopics:
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.