Question: Which x x x completes the following C + + insertion sort algorithm in ascending order? void InsertionSort ( int * numbers, int numbersSize )

Which xxx completes the following C++ insertion sort algorithm in ascending order?
void InsertionSort (int* numbers, int numbersSize){
for (int i=1; i numberssize; i++){
int j=i;
while (XXX){
??? Swap numbers j and numbers j-1
int temp = numbers j;
numbers [j]= numbers j-1;
numbers [j-1]= temp;
j--;
}
}
}
j>i && numbers [j] numbers i
numbers [j] numbers j-1 && j>0
j>0 && numbers [j] numbers j-1
j0 && numbers [j]> numbers j-1
 Which xxx completes the following C++ insertion sort algorithm in ascending

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!