What is the best-case time complexity of Insertion Sort?
O(1)
O(n)
O(n log n)
O(n^2)
Which of these situations might make Bubble Sort a suitable choice?
When the input array is almost sorted
Sorting a very large dataset
Sorting data with a complex key structure
Real-time applications where speed is critical
Why is Insertion Sort not preferred for large datasets?
It is not a stable sorting algorithm
It is difficult to implement
Its time complexity is quadratic in the worst case
It has a high space complexity
What is the space complexity of Bubble Sort in its standard form?
O(log n)
Is Bubble Sort a stable sorting algorithm?
Stability is irrelevant for Bubble Sort
Yes
Only in its optimized version
No
Which statement BEST describes the significance of understanding sorting algorithms?
It's only essential for software engineers specializing in algorithm development.
It enables developers to choose the most suitable algorithm for a given task based on efficiency and data characteristics.
All sorting algorithms perform equally well, so understanding them is unnecessary.
It's primarily a theoretical concept with little practical relevance.
Which of the following is a real-world application of sorting in databases?
Data encryption for enhanced security.
Data compression for efficient storage.
Natural language processing for text analysis.
Query optimization for faster retrieval of results.
Which of these characteristics is typically used to analyze and compare the efficiency of sorting algorithms?
Time complexity, which measures the number of operations as data size grows.
Code readability, which refers to how easy the code is to understand.
The specific data values being sorted.
Programming language used to implement the algorithm.
What is the worst-case time complexity of Selection Sort?
Is Selection Sort a stable sorting algorithm?
Stability is irrelevant for Selection Sort