Multiple Choice
Which of the following completes the selection sort method minimumPosition() ?
Private static int minimumPosition(int[] a, int from)
{
Int minPos = from;
For (int i = from + 1; i < a.length; i++)
{
________________
}
Return minPos;
}
A) if (a[i] > a[minPos]) { minPos = i; }
B) if (a[i] < a[minPos]) { minPos = i; }
C) if (a[i] < a[j]) { minPos = i; }
D) if (a[i] < a[minPos]) { i = minPos; }
Correct Answer:

Verified
Correct Answer:
Verified
Q7: The performance of an algorithm is most
Q16: The _ class contains a sort method
Q22: Suppose objects a and b are from
Q29: Suppose you wish to sort an array
Q37: If an element is present in an
Q46: Which sort algorithm starts by cutting the
Q53: After 5 iterations of selection sort working
Q78: Another name for linear search is _
Q96: Which sort algorithm is used in the
Q108: When the size of an array increases