MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the usual size of a run in tim sort? |
| A. | 32 |
| B. | less than 32 |
| C. | 32-64 depending on size of the array |
| D. | 64 |
| Answer» D. 64 | |
| 2. |
In which case will tim sort will work as an insertion sort? |
| A. | when no. of elements are less than 64 |
| B. | when no. of elements are greater than 64 |
| C. | when no. of elements are less than size of run |
| D. | when no. of elements are less than 32 |
| Answer» D. when no. of elements are less than 32 | |
| 3. |
Why is insertion sort preferred over other sorting algorithms (like selection sort, bubble sort etc.) for Tim sort implementation? |
| A. | Because insertion sort is faster and adaptive |
| B. | Because insertion sort requires less space |
| C. | Because insertion sort is easy to implement |
| D. | Because insertion sort is easy to understand |
| Answer» B. Because insertion sort requires less space | |
| 4. |
Which of the following algorithm is implemented internally in java when we use function arrays.sort()? |
| A. | intro sort |
| B. | quick sort |
| C. | tim sort |
| D. | merge sort |
| Answer» D. merge sort | |
| 5. |
What is the auxiliary space requirement of Tim 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) | |
| 6. |
What is the average time complexity of Tim sort? |
| A. | O(n) |
| B. | O(n log n) |
| C. | O(n<sup>2</sup>) |
| D. | O(log n) |
| Answer» C. O(n<sup>2</sup>) | |
| 7. |
What is the worst case time complexity of Tim sort? |
| A. | O(n) |
| B. | O(n log n) |
| C. | O(n<sup>2</sup>) |
| D. | O(log n) |
| Answer» C. O(n<sup>2</sup>) | |
| 8. |
What is the best case time complexity of Tim 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) | |
| 9. |
Tim sort is a comparison based sort. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 10. |
Which of the following sorting algorithm is not in-place? |
| A. | insertion sort |
| B. | tim sort |
| C. | quick sort |
| D. | intro sort |
| Answer» C. quick sort | |
| 11. |
Tim sort begins sorting the given array by using which of the following sorting algorithm? |
| A. | selection sort |
| B. | quick sort |
| C. | insertion sort |
| D. | merge sort |
| Answer» D. merge sort | |
| 12. |
Which of the following sorting algorithm is a constituent of tim sort? |
| A. | selection sort |
| B. | quick sort |
| C. | merge sort |
| D. | heap sort |
| Answer» D. heap sort | |
| 13. |
Which of the following is Python s standard sorting algorithm? |
| A. | quick sort |
| B. | introsort |
| C. | merge sort |
| D. | tim sort |
| Answer» E. | |