Gradient LabSign up free

Home / GATE DA / 2026 / Q.49

GATE DA 2026, Q.49: Comparisons on a nearly sorted array

Data structures and algorithmsBubble vs insertion sort2 marksMSQ (more than one correct)

The question

P = [1, 2, 3, 5, 4] is sorted by bubble sort (N1 comparisons) and insertion sort (N2 comparisons). Which are true? (A) N1 = 10, N2 = 4. (B) N1 > N2. (C) Insertion sort performs only one swap. (D) Both make at least one unnecessary comparison.

Checking your access…

Source: official GATE DA 2026 question paper and answer key (IIT Guwahati). The question is lightly reworded; every number and option is kept.