Algorithms
January 3, 2025Process-Scheduling
January 4, 2025Algorithms
|
Question 43
|
Give the correct matching for the following pairs:
A. O(log n) 1. Selection sort
B. O(n) 2. Insertion sort
C. O(nlog n) 3. Binary search
D. O(n2) 4. Merge sort
|
A – R B – P C – Q D – S
|
|
|
A – R B – P C – S D – Q
|
|
|
A – P B – R C – S D – Q
|
|
|
A – P B – S C – R D – Q
|
Question 43 Explanation:
Binary search = O(log n)
Selection = O(n)
Merge sort = O(n log n)
Insertion sort = O(n2)
Selection = O(n)
Merge sort = O(n log n)
Insertion sort = O(n2)
Correct Answer: B
Question 43 Explanation:
Binary search = O(log n)
Selection = O(n)
Merge sort = O(n log n)
Insertion sort = O(n2)
Selection = O(n)
Merge sort = O(n log n)
Insertion sort = O(n2)
