Solved

Which of the Following Completes the Selection Sort Method MinimumPosition()

Question 54

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions