Question:medium

Match LIST-I with LIST-II

\[\begin{array}{|c|c|}\hline \textbf{LIST-I (Asymptotic Time Complexity)} & \textbf{LIST-II (Algorithm)} \\ \hline \text{A. Logarithmic  \(O(\log n)\)} & \text{II. Finding an element in a sorted array} \\ \hline \text{B. Quadratic  \(O(n^{2})\)} & \text{III. Bubble sort (worst case)} \\ \hline \text{C. Cubic \(O(n^{3})\)} & \text{IV. Matrix Multiplication} \\ \hline \text{D. Exponential  \(O(2^{n})\)} & \text{I. The Tower of Hanoi problem} \\ \hline \end{array}\]
 

Choose the correct answer from the options given below:

Show Hint

Time complexity plays a critical role in evaluating the efficiency of algorithms. Understanding the time complexities of various algorithms helps optimize program performance.
Updated On: Feb 17, 2026
  • A - I, B - II, C - III, D - IV
  • A - II, B - III, C - IV, D - I
  • A - I, B - II, C - IV, D - III
  • A - III, B - I, C - D, I - II
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Associate time complexities with algorithms.
- A. Logarithmic (O(lg n)): The Tower of Hanoi problem exhibits a time complexity of \(O(lg n)\). 

- B. Quadratic (O(n²)): Searching for an element in a sorted array has a time complexity of \(O(n²)\), applicable to algorithms such as bubble sort or insertion sort. 

- C. Cubic (O(n³)): Bubble sort, in its worst-case scenario, has a time complexity of \(O(n³)\). 

- D. Exponential (O(2^n)): Matrix multiplication demonstrates an exponential time complexity of \(O(2^n)\).

Step 2: Conclusion. 
Therefore, the correct pairings are:

- A - I: Logarithmic time complexity corresponds to the Tower of Hanoi problem. 

- B - II: Quadratic time complexity is linked to finding an element in a sorted array. 

- C - III: Cubic time complexity is associated with Bubble sort in the worst case. 

- D - IV: Exponential time complexity applies to Matrix Multiplication. 

The correct option is (1).

Was this answer helpful?
0