Question : Which sorting algorithm repeatedly compares adjacent elements and swaps them if they are in the wrong order?
Solution :
Correct Answer : Bubble Sort
Description -
Question : Which sorting algorithm builds the sorted array one element at a time?
Solution :
Correct Answer : Insertion Sort
Description -
Question : Selection Sort works by:
Solution :
Correct Answer : Selecting the smallest element and placing it at the beginning
Description -
Question : Which sorting algorithm follows the Divide and Conquer approach?
Solution :
Correct Answer : Merge Sort
Description -
Question : Which sorting algorithm selects a pivot element?
Solution :
Correct Answer : Quick Sort
Description -
Question : Which sorting algorithm uses a Binary Heap?
Solution :
Correct Answer : Heap Sort
Description -
Question : Which sorting algorithm is NOT comparison-based?
Solution :
Correct Answer : Counting Sort
Description -
Question : Radix Sort sorts numbers by:
Solution :
Correct Answer : Digits
Description -
Question : Bucket Sort is most efficient when:
Solution :
Correct Answer : Data is uniformly distributed
Description -
Question : Shell Sort is an improvement over:
Solution :
Correct Answer : Insertion Sort
Description -
Question : Best-case time complexity of Bubble Sort (optimized)?
Solution :
Correct Answer : O(n)
Description -
Question : Average time complexity of Quick Sort?
Solution :
Correct Answer : O(n log n)
Description -
Question : Worst-case complexity of Quick Sort?
Solution :
Correct Answer : O(n²)
Description -
Question : Merge Sort requires:
Solution :
Correct Answer : O(n) extra memory
Description -
Question : Which sorting algorithm is stable?
Solution :
Correct Answer : Merge Sort
Description -
Question : Heap Sort worst-case complexity?
Solution :
Correct Answer : O(n log n)
Description -
Question : Counting Sort works best when:
Solution :
Correct Answer : Small integer range
Description -
Question : Radix Sort complexity is:
Solution :
Correct Answer : O(d(n+k))
Description -
Question : Which sort has the least number of swaps?
Solution :
Correct Answer : Selection Sort
Description -
Question : Shell Sort performance depends on:
Solution :
Correct Answer : Gap sequence
Description -
Question : Which sorting algorithm guarantees O(n log n) in the worst case?
Solution :
Correct Answer : Merge Sort
Description -
Question : Which algorithm is in-place but NOT stable?
Solution :
Correct Answer : Heap Sort
Description -
Question : Which algorithm performs best for nearly sorted data?
Solution :
Correct Answer : Insertion Sort
Description -
Question : Counting Sort cannot directly sort:
Solution :
Correct Answer : Floating-point numbers
Description -
Question : Average complexity of Bucket Sort is:
Solution :
Correct Answer : O(n+k)
Description -
Question : Which algorithm generally has the best cache performance?
Solution :
Correct Answer : Quick Sort
Description -
Question : Which sorting algorithm is recursive by nature?
Solution :
Correct Answer : Quick Sort
Description -
Question : Which algorithm is unsuitable for linked lists?
Solution :
Correct Answer : Quick Sort
Description -
Question : Which algorithm is preferred for external sorting of huge files?
Solution :
Correct Answer : Merge Sort
Description -
Question : Which algorithm has the best average-case performance among comparison-based sorts?
Solution :
Correct Answer : Quick Sort
Description -