GATE DA 2026 — Question 49

Programming, Data Structures and Algorithmsbasic sorting algorithms: selection sort, bubble sort and insertion sortMSQ2 marksMedium

Consider the problem of sorting the given array in ascending order: P = [1, 2, 3, 5, 4] Consider two sorting algorithms Bubble Sort (BS) and Insertion Sort (IS). Let \(N_1\) be the total number of comparisons done by BS on the elements of P and \(N_2\) be the total number of comparisons done by IS on the elements of P. Which of the following options is/are correct?
  1. A
    \(N_1 = 10,\ N_2 = 4\)
  2. B
    \(N_1 > N_2\)
  3. C
    IS on P will perform only one swap
  4. D
    Both BS and IS on P will make at least one unnecessary comparison (i.e., comparing elements that are already in correct order)
Practise the full 2026 paper
Challenge a friend: WhatsApp Telegram
From RENYXERAWhat rank do your marks get?GATE score, likely All-India Rank and qualifying marks for your category.
Practise more on basic sorting algorithms: selection sort, bubble sort and insertion sortTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group