Concept:
• Algorithm analysis involves evaluating the performance (Time and Space complexity) of different sorting methods under various conditions (Worst, Average, and Best case).
Step 1: Evaluate log-linear sorts (A and B)
Merge sort and Heap sort both use a divide-and-conquer strategy (logarithmic levels) and process every element (linear work), leading to a guaranteed \(O(n \log n)\) complexity in all cases. Quick sort is also \(O(n \log n)\) on average but degrades to \(O(n^2)\) if the pivot choices are poor (e.g., sorted arrays). Statements A and B are Correct.
Step 2: Evaluate relative performance (C)
For large \(n\), an \(O(n \log n)\) algorithm (Merge sort) will always eventually be faster than an \(O(n^2)\) algorithm (Insertion sort). Insertion sort is only faster for very small arrays. Statement C is Incorrect.
Step 3: Evaluate Stability (D)
A sorting algorithm is stable if it preserves the relative order of elements with equal keys. Bubble sort only swaps adjacent elements if they are strictly out of order, making it stable. Statement D is Correct.
Step 4: Evaluate Swap efficiency (E)
Selection sort finds the minimum in each pass and performs exactly one swap. Insertion sort may perform up to \(O(n)\) swaps (or rather, shifts) for a single element to reach its destination. In terms of memory writes/swaps, Selection sort is superior. Statement E is Correct.