1.3k views
5 votes
Select the correct text in the passage.

Brian has created the following selection sort class in Java. In which line is the index of the smallest value returned? In which line is the input array given as an argument?

public class SelectionSort
private static int positionMin (int] vals, int startPosition) { int minPosition startPosition; for (int i startPosition; i

1 Answer

4 votes

Answer:

Answer is given below

Step-by-step explanation:

The index of the smallest value returned by function positionMin(),

and it is done by line "return minPosition;"

The input array is given as an argument in function selSort() and it is done by line "public static void selSort(int [] vals)" Here vals is input array argument.

User Olga Dalton
by
5.4k points