Sorting in Data Structure

@T-Bone

This question paper focuses on the "Sorting" of Data Structure. These Multiple Choice Questions (mcq) should be practiced to improve the Data Structure skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This question paper focuses on the "Sorting" of Data Structure. These Multiple Choice Questions (mcq) should be practiced to improve the Data Structure skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?

Mark the correct option

2. Which of the following is not a stable sorting algorithm?

Mark the correct option

3. What is an external sorting algorithm?

Mark the correct option

4. If the number of records to be sorted is small, then …… sorting can be efficient.

Mark the correct option

5. uppose we have a O(n) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort.

Mark the correct option

6. Which of the following is not an in-place sorting algorithm?

Mark the correct option

7. What is the advantage of bubble sort over other sorting techniques?

Mark the correct option

8. he complexity of sorting algorithm measures the …… as a function of the number n of items to be sorter.

Mark the correct option

9. Suppose we are sorting an array of eight integers using quicksort, and we have just finished the first partitioning with the array looking like this: 2 5 1 7 9 12 11 10 Which statement is correct?

Mark the correct option

10. Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general?

Mark the correct option

11. In the following scenarios, when will you use selection sort?

Mark the correct option

12. What is the worst case complexity of selection sort?

Mark the correct option

13. What is the advantage of selection sort over other sorting techniques?

Mark the correct option

14. What is the average case complexity of selection sort?

Mark the correct option

15. What is the disadvantage of selection sort?

Mark the correct option

16. The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and selection sort respectively are,

Mark the correct option

17. The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable)The number of iterations in selection sort and bubble sort respectively are,

Mark the correct option

18. What is the best case complexity of selection sort?

Mark the correct option

19. What is an internal sorting algorithm?

Mark the correct option

20. What is the worst case complexity of bubble sort?

Mark the correct option

21. What is the average case complexity of bubble sort?

Mark the correct option

22. The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array?

Mark the correct option

23. What is the best case efficiency of bubble sort in the improvised version?

Mark the correct option

24. QuickSort can be categorized into which of the following?

Mark the correct option

25. What is a randomized QuickSort?

Mark the correct option

Index of Questions