
16.40 | Data Structures and Algorithms Using C++
EXERCISES
F
ILL IN THE BLANKS
1. algorithms have the same complexity as
O
(
n
2
)
2. Merge sort and quick sort follow
principle.
3. e time complexity of merge sort is
.
4. Shell sort performs sorting on an array by
.
5. Radix sort uses to sort the elements.
MULTIPLE-CHOICE QUESTIONS
1. Which of the following sorting algorithm is of divide-and-conquer type?
a. Bubble sort b. Insertion sort
c. Quick sort d. All of the above
2. e complexity of Bubble sort algorithm is
a.
O
(
n
) b.
O
(
log n
)
c.
O
(
n
2
) d.
O
(
nlog n
)
3. e complexity of the merge sort algorithm is .
a.
O
(
n