Solved

One Can Sort an Array A[ ] as Follows

Question 2

Multiple Choice

One can sort an array a[ ] as follows.Start by observing that at stage 0,the array segment consisting of the single element a[0] is sorted.Now suppose that at the stage k,the segment a[0..k] is sorted.Take the element a[k+1],and call it X.By moving some of the elements in a[0..k] one place to the right,create a place to put X in so that now a[0..k+1] is sorted.The algorithm that uses this strategy is called


A) bubble sort
B) insertion sort
C) selection sort
D) Quicksort

Correct Answer:

verifed

Verified

Related Questions