What characteristic of TimSort helps it perform well on real-world data?
A. It is a hybrid sorting algorithm combining Merge Sort and Insertion Sort.
B. It is a stable sort.
C. It uses less memory.
D. It is efficient for small arrays.
Select an option to see the answer and solution.
Which sorting algorithm performs the fewest number of swaps on average?
A. Heap Sort
B. Quick Sort
C. Selection Sort
D. Insertion Sort
Select an option to see the answer and solution.
In which scenario does the Heap Sort algorithm perform best?
A. When the data is partially sorted.
B. When the data is sorted in reverse.
C. When the data is unsorted.
D. When the data is very small.
Select an option to see the answer and solution.
What type of sorting algorithm is Bucket Sort?
A. Hybrid
B. Non-comparison-based
C. Stable sort
D. Hybrid
Select an option to see the answer and solution.
Which sorting algorithm does not work efficiently for arrays with large ranges of integer keys?
A. Quick Sort
B. Merge Sort
C. Counting Sort
D. Radix Sort
Select an option to see the answer and solution.
Shell sort is more efficient than insertion sort if the length of input arrays is small.
Select an option to see the answer and solution.
The given array is arr={7, 4, 5, 8, 1, 2}. The number of iterations required to sort the array using comb sort and bubble sort respectively will be . . . . . . . .
A. 7 and 8
B. 5 and 6
C. 5 and 5
D. 4 and 5
Select an option to see the answer and solution.
What is the auxiliary space complexity of merge sort?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
Select an option to see the answer and solution.
What is the auxiliary space requirement of permutation sort?
A. O(n)
B. O(1)
C. O(log n)
D. O(n log n)
Select an option to see the answer and solution.
Which of the following is an example of parallel sorting technique?
A. bogo sort
B. sleep sort
C. cube sort
D. merge sort
Select an option to see the answer and solution.
Bead sort is also known as . . . . . . . .
A. gravity sort
B. strand sort
C. abacus sort
D. counting sort
Select an option to see the answer and solution.
What is the average case complexity of selection sort?
A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2 )
Select an option to see the answer and solution.
Which of the following is not an example of non comparison sort?
A. bubble sort
B. counting sort
C. radix sort
D. bucket sort
Select an option to see the answer and solution.
Which of the following sorting algorithm is not in place?
A. insertion sort
B. quick sort
C. tree sort
D. gnome sort
Select an option to see the answer and solution.
Which of the following algorithm implementations is similar to that of an insertion sort?
A. Binary heap
B. Quick sort
C. Merge sort
D. Radix sort
Select an option to see the answer and solution.
Which of the following is not a stable sorting algorithm?
A. Quick sort
B. Cocktail sort
C. Bubble sort
D. Merge sort
Select an option to see the answer and solution.
Which of the following sorting algorithm is only applicable to positive integers?
A. quick sort
B. heap sort
C. bead sort
D. strand sort
Select an option to see the answer and solution.
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
Select an option to see the answer and solution.
In a computational complexity theory, a problem with decision making is said to be NP-complete when it is both in NP and NP-hard. What does NP mean?
A. Non Polynomial time
B. Non-deterministic Probabilistic
C. Non-deterministic Polynomial time
D. Non Probabilistic time
Select an option to see the answer and solution.
The complexity of which of the following sorting algorithms remains to be the same in its best, average and worst case?
A. quick sort
B. insertion sort
C. counting sort
D. gnome sort
Select an option to see the answer and solution.