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:

Verified
Correct Answer:
Verified
Q1: The worst case complexity function is a
Q3: When applied to an array a[ ]
Q4: An array a[ ] of N elements
Q5: Let F be an algorithm with complexity
Q6: The selection sort algorithm works by<br>A) repeatedly
Q7: Binary Search is in the complexity class<br>A)
Q8: Consider the following implementation of insertion sort:<br>Public
Q9: The insertion sort algorithm works by<br>A) repeatedly
Q10: A search for an item X in
Q11: If lower is the first subscript in