Searching, Sorting & Selection

Answer & solution
Official answer: D
Our answer: D under textbook implementation conventions
With first/last-element pivot selection, sorted input gives quicksort Θ(n²). An early-exit bubble sort detects no swaps after one pass and takes Θ(n), ordinary mergesort remains Θ(n log n), and insertion sort takes Θ(n). These conventions make I and IV true, D. The names alone do not determine these cases: a balanced/randomized-pivot quicksort need not be quadratic, unoptimized bubble sort can be quadratic, and adaptive mergesort can be linear. The official answer requires the stated implementation choices.
The quadratic quicksort recurrence is T(n)=T(n−1)+Θ(n), whose level costs add to Θ(n²). The insertion-sort best case makes one failed comparison per new item, hence linear work. Standard merging processes n elements at each of log n levels. These derivations explain the official convention rather than falsely treating algorithm names as complete implementations.