MCQOPTIONS
Saved Bookmarks
This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Counting Sort Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following algorithm takes non linear time for sorting? |
| A. | counting sort |
| B. | quick sort |
| C. | bucket sort |
| D. | radix sort |
| Answer» C. bucket sort | |
| 2. |
What is the disadvantage of counting sort? |
| A. | counting sort has large time complexity |
| B. | counting sort has large space complexity |
| C. | counting sort is not a comparison based sorting technique |
| D. | counting sort cannot be used for array with non integer elements |
| Answer» E. | |
| 3. |
What is the advantage of counting sort over quick sort? |
| A. | counting sort has lesser time complexity when range is comparable to number of input elements |
| B. | counting sort has lesser space complexity |
| C. | counting sort is not a comparison based sorting technique |
| D. | it has no advantage |
| Answer» B. counting sort has lesser space complexity | |
| 4. |
Counting sort is often used as a sub routine for radix sort. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 5. |
Which of the following statement is true about comparison based sorting? |
| A. | counting sort is a comparison based sort |
| B. | any comparison based sorting can be made stable |
| C. | bubble sort is not a comparison based sort |
| D. | any comparison based sort requires at least O(n<sup>2</sup>) time |
| Answer» C. bubble sort is not a comparison based sort | |
| 6. |
The complexity of which of the following sorting algorithms remains to be the same in its best, average and worst case? |
| A. | quick sort |
| B. | insertion sort |
| C. | counting sort |
| D. | gnome sort |
| Answer» D. gnome sort | |
| 7. |
What is the average time complexity of counting sort? |
| A. | O(n) |
| B. | O(n+k) k=range of input |
| C. | O(n<sup>2</sup>) |
| D. | O(n log n) |
| Answer» C. O(n<sup>2</sup>) | |
| 8. |
Which of the following uses the largest amount of auxiliary space for sorting? |
| A. | Bubble sort |
| B. | Counting sort |
| C. | Quick sort |
| D. | Heap sort |
| Answer» C. Quick sort | |
| 9. |
Which of the following sorting techniques is stable? |
| A. | quick sort |
| B. | counting sort |
| C. | heap sort |
| D. | selection sort |
| Answer» C. heap sort | |
| 10. |
It is not possible to implement counting sort when any of the input element has negative value. |
| A. | True |
| B. | False |
| Answer» C. | |
| 11. |
What is the auxiliary space requirement of counting sort? |
| A. | O(1) |
| B. | O(n) |
| C. | O(log n) |
| D. | O(n+k) k=range of input |
| Answer» E. | |
| 12. |
Which of the following is not an example of non comparison sort? |
| A. | bubble sort |
| B. | counting sort |
| C. | radix sort |
| D. | bucket sort |
| Answer» B. counting sort | |
| 13. |
How many comparisons will be made to sort the array arr={1,5,3,8,2} using counting sort? |
| A. | 5 |
| B. | 7 |
| C. | 9 |
| D. | 0 |
| Answer» E. | |