In the worst case time….run in O(n2).
a) Bubble sort
b) Selection sort
c) Insertion sort
d) All of the above
Assume that A*1...i - 1+ have already been sorted. Insert A[i] into its proper position in this sub array. Create this position by shifting all larger elements to the right?
a) Selection sort
b) Bubble sort
c) Merge sort
d) Insertion sort
Scan the array. Whenever two consecutive items are found that are out of order, swap them. Repeat until all consecutive items are in order. It is called
a) Insertion sort
b) Bubble sort
c) Selection sort
d) none
There are a number of well-known…..O(n^2) sorting algorithms.
a) fast
b) slow
c) NA
d) N/A
More generally, A is an array of objects and we sort them based on one of the attributes - the key value?
a) True
b) False
c) NA
d) NA
In sorting, we are given an array A[1..n] of n numbers We are to reorder these elements into increasing (or decreasing) order?
a) True
b) False
c) NA
d) NA