Database-Management-System
October 14, 2023GATE 2007
October 14, 2023GATE 2007
Question 14
|
Which of the following sorting algorithms has the lowest worst-case complexity?
Merge sort
|
|
Bubble Sort
|
|
Quick Sort
|
|
Selection Sort
|
Question 14 Explanation:
Worst case time complexities are
Merge sort→ O(nlogn)
Bubble sort→ O(n2)
Quick sort→ O(n2)
Selection sort→ O(n2)
Merge sort→ O(nlogn)
Bubble sort→ O(n2)
Quick sort→ O(n2)
Selection sort→ O(n2)
Correct Answer: A
Question 14 Explanation:
Worst case time complexities are
Merge sort→ O(nlogn)
Bubble sort→ O(n2)
Quick sort→ O(n2)
Selection sort→ O(n2)
Merge sort→ O(nlogn)
Bubble sort→ O(n2)
Quick sort→ O(n2)
Selection sort→ O(n2)
Subscribe
Login
0 Comments