Question:

Arrange the following time complexities in increasing order:
• [A.] Linear search worst case
• [B.] Quick sort expected running time
• [C.] Binary search best case
• [D.] Bubble sort worst case
Choose the correct answer from the options given below:

Show Hint

Always remember growth order: \(1 < \log n < n < n\log n < n^2 < 2^n\).
Updated On: Jun 5, 2026
  • A, C, B, D
  • C, D, B, A
  • C, A, B, D
  • A, B, C, D
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Concept: We compare time complexities of algorithms:
• Binary Search (best case): \(O(1)\)
• Linear Search (worst case): \(O(n)\)
• Quick Sort (average case): \(O(n \log n)\)
• Bubble Sort (worst case): \(O(n^2)\)

Step 1:
Write complexities clearly. \[ C = O(1), \quad A = O(n), \quad B = O(n\log n), \quad D = O(n^2) \]

Step 2:
Arrange in increasing order. \[ O(1) < O(n) < O(n\log n) < O(n^2) \]

Step 3:
Match with given options. \[ C \rightarrow A \rightarrow B \rightarrow D \]

Step 4:
Final answer. \[ \boxed{(3)\ C,\ A,\ B,\ D} \]
Was this answer helpful?
0
0