Sorting Algorithms: Quick, Merge, Heap - Complexity Analysis - Higher Difficulty Problems

Download Q&A
Q. In the worst case, what is the time complexity of Merge Sort?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(log n)
Q. What is the space complexity of Heap Sort?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. What is the time complexity of the worst-case scenario for Quick Sort when the pivot is the smallest or largest element?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(log n)
Q. Which of the following statements about Heap Sort is true?
  • A. It is a stable sort
  • B. It is an in-place sort
  • C. It is faster than Quick Sort
  • D. It requires O(n^2) time in the worst case
Q. Which sorting algorithm uses a divide-and-conquer strategy?
  • A. Bubble Sort
  • B. Selection Sort
  • C. Merge Sort
  • D. Insertion Sort
Showing 1 to 5 of 5 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely