# Timsort Multiple choice Questions and Answers (MCQs)

## Timsort Multiple choice Questions and Answers (MCQs)

 Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Tim sort is a comparison based sort.
 A true B false
Question 6 Explanation:
Merge sort and insertion sort are comparison based sorts. Thus overall Tim sort also becomes a comparison based sort.

 Question 7 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the best case time complexity of Tim sort?
 A O(n) B O(n log n) C O(n2) D O(log n)
Question 7 Explanation:
Best case time complexity of Tim sort occurs when the input array is already sorted. In such a case only one run will be required.

 Question 8 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the worst case time complexity of Tim sort?
 A O(n) B O(n log n) C O(n2) D O(log n)
Question 8 Explanation:
Worst case time complexity of Tim sort is O(n log n). It is because the worst complexity of merge sort is O(n log n) and insertion sort is only applied for small arrays.

 Question 9 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the average time complexity of Tim sort?
 A O(n) B O(n log n) C O(n2) D O(log n)
Question 9 Explanation:
Average time complexity of Tim sort remains to be O(n log n). It is the same as the average case complexity of merge sort.

 Question 10 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the auxiliary space requirement of Tim sort?
 A O(n) B O(n log n) C O(n2) D O(log n)
Question 10 Explanation:
Tim sort is a hybrid of merge sort and insertion sort. It requires to merge sorted runs which require a third array of the size equal to the sum of the two runs. So in worst case the auxiliary space requirement will be O(n).

There are 10 questions to complete.