Why is Insertion Sort not preferred for large datasets?
Its time complexity is quadratic in the worst case
It has a high space complexity
It is difficult to implement
It is not a stable sorting algorithm
Which of the following best describes the concept of 'stability' in sorting algorithms?
A stable sorting algorithm is resistant to errors in the input data.
A stable sorting algorithm uses a fixed amount of memory regardless of input size.
A stable sorting algorithm maintains the relative order of equal elements.
A stable sorting algorithm always has the lowest time complexity.
What is the worst-case space complexity of Insertion Sort?
O(n log n)
O(log n)
O(1)
O(n)
What is the space complexity of Bubble Sort in its standard form?
O(n^2)
Bubble sort performs better than selection sort in which scenario?
When the input array is randomly ordered.
When the input array is already sorted.
Bubble sort never outperforms Selection sort
When the input array is reversely sorted.
What is the fundamental difference between comparison-based and non-comparison-based sorting algorithms?
Comparison-based algorithms sort by comparing elements, while non-comparison-based algorithms exploit data properties for sorting.
Comparison-based algorithms are faster than non-comparison-based algorithms.
Comparison-based algorithms are more memory efficient than non-comparison-based algorithms.
Comparison-based algorithms are used for numerical data, while non-comparison-based algorithms are used for text data.
Is Bubble Sort a stable sorting algorithm?
Stability is irrelevant for Bubble Sort
Yes
No
Only in its optimized version
Which of the following sorting algorithms is categorized as NON-comparison based?
Merge Sort
Quick Sort
Radix Sort
Insertion Sort
Why are sorting algorithms considered fundamental in computer science?
They are the basis for more complex algorithms and data structures.
They are primarily used for displaying data to the user.
They are rarely used in modern software development.
They are only used in specific niche applications.
What does it mean for a sorting algorithm to be 'in-place'?
It sorts the data without requiring significant additional storage space.
It is the fastest possible sorting algorithm for a given data set.
It can sort data of any type, including numbers, text, and images.
It sorts the data in its original location without moving elements.