Is Merge Sort an in-place sorting algorithm?
Yes
No
What is the space complexity of Merge Sort?
O(n log n)
O(n)
O(log n)
O(1)
Radix Sort utilizes which of the following properties of the input data to achieve its efficiency?
Pre-sortedness of the data
Order statistics of the data
Distribution of the data values within a range
Frequency of occurrence of data elements
What is the primary disadvantage of using Radix Sort compared to comparison-based sorting algorithms?
Limited applicability to specific data types
Higher space complexity due to bucket usage
Significant performance degradation for nearly sorted data
Inability to handle negative numbers effectively
Why is binary search a preferred algorithm for searching in sorted arrays compared to linear search?
Binary search uses less memory than linear search.
Binary search is easier to implement and understand than linear search.
Binary search works correctly even on unsorted arrays, while linear search does not.
Binary search has a time complexity of O(log n), which is significantly faster than linear search's O(n) complexity for large datasets.
How does the space complexity of Heap Sort compare to other comparison-based sorting algorithms?
Heap Sort has a lower space complexity
Heap Sort typically has the same space complexity
Heap Sort's space complexity depends on the input data
Heap Sort has a higher space complexity
In counting sort, what does the count array store?
The frequency of each distinct element in the input array.
The sorted elements of the input array.
The cumulative sum of frequencies of elements less than or equal to each element in the input array.
The indices of elements in the input array.
Which of the following is a common use case for Merge Sort?
Sorting a linked list
Finding the smallest element in an array
Sorting a nearly sorted array
Sorting a small array with less than 10 elements
Counting sort is particularly well-suited for sorting:
Datasets containing negative integers.
Large datasets with a wide range of values.
Small datasets with a limited range of values.
Datasets with floating-point numbers.
What is the significance of lexicographic sorting in string processing?
It sorts strings based on their lengths, from shortest to longest or vice versa.
It sorts strings based on the number of vowels they contain.
It sorts strings in alphabetical order, considering the order of characters defined by the character encoding (e.g., ASCII or Unicode).
It sorts strings based on their hash values, making it very efficient for comparing large strings.