How does Merge Sort handle the base case of a single-element subarray?
It throws an error, as a single-element array cannot be sorted.
It recursively divides the single-element array.
It performs a swap operation on the element.
It considers a single-element array as inherently sorted.
Radix Sort utilizes which of the following properties of the input data to achieve its efficiency?
Distribution of the data values within a range
Pre-sortedness of the data
Frequency of occurrence of data elements
Order statistics of the data
What is the purpose of the partitioning step in the Quick Sort algorithm?
To merge two sorted subarrays into a single sorted array
To divide the array into two subarrays such that all elements in the left subarray are less than or equal to the pivot and all elements in the right subarray are greater than the pivot
To find the median element of the array
To sort the entire array in ascending order
What is the space complexity of Bucket Sort in the average case, assuming a suitable hash function and uniform data distribution?
O(n log n)
O(n)
O(log n)
O(1)
Which of the following is a common use case for Merge Sort?
Sorting a small array with less than 10 elements
Sorting a nearly sorted array
Finding the smallest element in an array
Sorting a linked list
Which of the following is a key advantage of Merge Sort?
Best-case time complexity of O(n)
In-place sorting
Stable sorting
Constant space complexity
Which of the following best describes the role of the base case in a recursive implementation of Quick Sort?
To partition the array around a chosen pivot element
To define the condition when the array is fully sorted and the recursion should stop
To handle the comparison and swapping of elements during the sorting process
To select the pivot element for each recursive call
Is counting sort inherently stable?
The stability of counting sort depends on the input data.
Counting sort can be made stable with modifications to the algorithm.
No, counting sort is inherently unstable.
Yes, counting sort is always stable.
Is Heap Sort a stable sorting algorithm?
No
Yes
What is a potential limitation of Heap Sort compared to some other efficient sorting algorithms?
It is less efficient when the input data is already nearly sorted.
Its average-case time complexity is worse than some other algorithms.
It requires the entire dataset to be in memory.
It is not well-suited for sorting linked lists.