What is the primary disadvantage of using Radix Sort compared to comparison-based sorting algorithms?
Significant performance degradation for nearly sorted data
Inability to handle negative numbers effectively
Higher space complexity due to bucket usage
Limited applicability to specific data types
Which of the following is a common use case for Merge Sort?
Sorting a nearly sorted array
Sorting a linked list
Sorting a small array with less than 10 elements
Finding the smallest element in an array
Bucket Sort can be considered a stable sorting algorithm under which condition?
The number of buckets is equal to the number of elements.
Bucket Sort is inherently stable regardless of the input or implementation.
The input data is already sorted.
The underlying sorting algorithm used within each bucket is stable.
What is a potential limitation of Heap Sort compared to some other efficient sorting algorithms?
It is not well-suited for sorting linked lists.
It requires the entire dataset to be in memory.
It is less efficient when the input data is already nearly sorted.
Its average-case time complexity is worse than some other algorithms.
What is a key limitation of counting sort?
It is not suitable for sorting strings or objects.
It cannot sort datasets containing duplicate values.
Its space complexity can be significant if the range of input values is large.
It is only efficient for datasets with an even number of elements.
Is counting sort inherently stable?
No, counting sort is inherently unstable.
Yes, counting sort is always stable.
Counting sort can be made stable with modifications to the algorithm.
The stability of counting sort depends on the input data.
Is Merge Sort an in-place sorting algorithm?
No
Yes
How does the time complexity of Radix Sort compare to comparison-based sorting algorithms like Merge Sort and Quick Sort for integers with a wide range?
Radix Sort has the same time complexity
Radix Sort is always slower
Radix Sort can be faster under certain conditions
Radix Sort is consistently faster
What is the space complexity of Merge Sort?
O(log n)
O(n log n)
O(n)
O(1)
What makes Hoare's partitioning scheme generally preferred over Lomuto's in Quick Sort implementations?
Hoare's scheme is more intuitive and easier to implement
Hoare's scheme performs fewer swaps on average, leading to better performance
Lomuto's scheme is not suitable for arrays with duplicate elements
Lomuto's scheme always selects the last element as the pivot, leading to worse performance