All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2022 Shift 1

Arrange the following search and sort algorithms in ascending order of their worst-case complexities:
A. Merge sort
B. Linear search
C. Bubble sort
D. Binary search
Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. D, B, A, C

Explanation

Binary search O(log n) < linear search O(n) < merge sort O(n log n) < bubble sort O(n²).

More Data Structures and Algorithms questions