Match the LIST-I with LIST-II
LIST-I LIST-II A. Bubble sort I. Repeatedly compare adjacent elements B. Insertion sort II. Constant time algorithms C. Algorithm with nested loop III. Quadratic time algorithms D. Algorithms with no loops IV. Places elements in sorted list one by one
Match the LIST-I with LIST-II
| LIST-I | LIST-II | ||
|---|---|---|---|
| A. | Bubble sort | I. | Repeatedly compare adjacent elements |
| B. | Insertion sort | II. | Constant time algorithms |
| C. | Algorithm with nested loop | III. | Quadratic time algorithms |
| D. | Algorithms with no loops | IV. | Places elements in sorted list one by one |
Solution
✅ Correct Option: 3
| List I | List II |
|---|---|
| (A) Bubble sort | (I) Repeatedly compare adjacent elements |
| (B) Insertion sort | (IV) Places elements in sorted list one by one |
| (C) Algorithm with nested loop | (III) Quadratic time algorithms |
| (D) Algorithms with no loops | (II) Constant time algorithms |
Bubble sort swaps adjacent elements that are out of order, pass after pass. Insertion sort takes each element and inserts it into its correct place in the already sorted part.
A nested loop runs about times, which gives (quadratic) time. With no loops, the number of steps does not depend on input size, so the time is (constant).
Option 4: bubble sort and insertion sort are both quadratic in the worst case, which makes A-III tempting. But the match for bubble sort is its adjacent-comparison method, and the "nested loop" item is what maps to quadratic time.
Related questions:
2026: 11 May Shift 2
2026: 26 May Shift 1
2026: 20 May Shift 1
2026: 23 May Shift 2