✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the sort method shown below for selection sort:
public static void sort(int[] a)
{
for (int i = 0; i < a.length – 1; i++)
{
int minPos = minimumPosition(i);
swap(minPos, i);
}
}
Suppose we modify the loop condition to read i < a.length. What would be the result?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!