What is the best-case time complexity of Insertion Sort?
O(1)
O(n^2)
O(n)
O(n log n)
What is the worst-case time complexity of Selection Sort?
O(log n)
Which of the following sorting algorithms has the best-case time complexity of O(n)?
Neither Bubble Sort nor Selection Sort
Bubble Sort
Both Bubble Sort and Selection Sort
Selection Sort
What is the space complexity of Bubble Sort in its standard form?
When does Insertion Sort exhibit its worst-case time complexity?
When all elements in the array are the same
When the array is already sorted
When the array is reverse sorted
When the array has a random distribution of elements
What does it mean for a sorting algorithm to be 'in-place'?
It sorts the data in its original location without moving elements.
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 without requiring significant additional storage space.
Which algorithm repeatedly finds the minimum element from the unsorted part and puts it at the beginning?
Quick Sort
Merge Sort
Which statement BEST describes the significance of understanding sorting algorithms?
All sorting algorithms perform equally well, so understanding them is unnecessary.
It's primarily a theoretical concept with little practical relevance.
It enables developers to choose the most suitable algorithm for a given task based on efficiency and data characteristics.
It's only essential for software engineers specializing in algorithm development.
In what real-world scenario might you encounter the need for a sorting algorithm?
Displaying search results in order of relevance.
Generating random numbers within a specified range.
Compressing an image file to reduce its size.
Encrypting a message for secure communication.
Is Bubble Sort a stable sorting algorithm?
No
Yes
Only in its optimized version
Stability is irrelevant for Bubble Sort