Which of the following sorting algorithms has a worst-case time complexity of O(n^2)?
Correct: D
Insertion Sort has a worst-case time complexity of O(n^2). While Quick Sort *can* have a worst-case time complexity of O(n^2) , it is only in very specific circumstances. Merge Sort and Heap Sort both have O(n log n) worst-case complexities.