MCQOPTIONS
Saved Bookmarks
This section includes 9 Mcqs, each offering curated multiple-choice questions to sharpen your Cocktail Sort Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Bubble sort performs better as compared to cocktail sort. |
| A. | True |
| B. | False |
| Answer» C. | |
| 2. |
How many iterations are required to sort the array arr={2,3,4,5,1} using bubble sort and cocktail sort respectively? |
| A. | 4,2 |
| B. | 5,3 |
| C. | 5,2 |
| D. | 4,3 |
| Answer» B. 5,3 | |
| 3. |
What is the best case time complexity of cocktail sort? |
| A. | O(n) |
| B. | O(n log n) |
| C. | O(n<sup>2</sup>) |
| D. | O(log n) |
| Answer» B. O(n log n) | |
| 4. |
What is the worst case time complexity of cocktail sort? |
| A. | O(n) |
| B. | O(n log n) |
| C. | O(n<sup>2</sup>) |
| D. | O(log n) |
| Answer» D. O(log n) | |
| 5. |
Cocktail sort uses which of the following methods for sorting the input? |
| A. | selection |
| B. | partitioning |
| C. | merging |
| D. | exchanging |
| Answer» E. | |
| 6. |
Cocktail sort is a comparison based sort. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 7. |
Auxiliary space requirement of cocktail sort is _____________ |
| A. | O(n) |
| B. | O(log n) |
| C. | O(1) |
| D. | O(n<sup>2</sup>) |
| Answer» D. O(n<sup>2</sup>) | |
| 8. |
Cocktail sort is a variation of _____________ |
| A. | Bubble sort |
| B. | Selection sort |
| C. | Insertion sort |
| D. | Gnome sort |
| Answer» B. Selection sort | |
| 9. |
Cocktail sort is also known as ________________ |
| A. | bidirectional sort |
| B. | bubble sort |
| C. | brick sort |
| D. | ripple sort |
| Answer» E. | |