GATE DA 2024 — Question 45

Programming, Data Structures and Algorithmsbasic sorting algorithms: selection sort, bubble sort and insertion sortMCQ2 marks · −2/3 if wrongMedium

Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii) Selection sort Which ONE among the following choices of sorting algorithms sorts the numbers in the array [4, 3, 2, 1, 5] in increasing order after exactly two passes over the array?
  1. A
    (i) only
  2. B
    (iii) only
  3. C
    (i) and (iii) only
  4. D
    (ii) and (iii) only
Practise the full 2024 paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
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