MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Pigeonhole Sort Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following algorithm takes linear time for sorting? |
| A. | pigeonhole sort |
| B. | heap sort |
| C. | comb sort |
| D. | cycle sort |
| Answer» B. heap sort | |
| 2. |
What is the advantage of pigeonhole sort over merge sort? |
| A. | pigeonhole sort has lesser time complexity when range is comparable to number of input elements |
| B. | pigeonhole sort has lesser space complexity |
| C. | counting sort is not a comparison based sorting technique |
| D. | pigeonhole sort is adaptive |
| Answer» B. pigeonhole sort has lesser space complexity | |
| 3. |
What is the average time complexity of pigeonhole sort (k=range of input)? |
| A. | O(n) |
| B. | O(n+k) |
| C. | O(n<sup>2</sup>) |
| D. | O(n*k) |
| Answer» C. O(n<sup>2</sup>) | |
| 4. |
Pigeonhole sort is an in place sorting algorithm. |
| A. | true |
| B. | false |
| Answer» C. | |
| 5. |
Pigeonhole sort is a stable sorting algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 6. |
The auxiliary array used in pigeonhole sorting is called ______________ |
| A. | bucket |
| B. | pigeon |
| C. | hole |
| D. | pigeonhole |
| Answer» E. | |
| 7. |
What is the space complexity of pigeonhole sort (k=range of input)? |
| A. | O(n*k) |
| B. | O(n) |
| C. | O(k) |
| D. | O(n+k) |
| Answer» E. | |
| 8. |
In which of the following case pigeonhole sort is most efficient? |
| A. | when range of input is less than number of elements |
| B. | when range of input is more than number of elements |
| C. | when range of input is comparable to the number of elements |
| D. | when the given array is almost sorted |
| Answer» D. when the given array is almost sorted | |
| 9. |
Which of the following is a non-comparison sort? |
| A. | heap sort |
| B. | quick sort |
| C. | merge sort |
| D. | pigeonhole sort |
| Answer» E. | |
| 10. |
How many comparisons will be made to sort the array arr={1,5,3,8,2} using pigeonhole sort? |
| A. | 5 |
| B. | 7 |
| C. | 9 |
| D. | 0 |
| Answer» E. | |