GATE CS 2021, set 1 · Question 19 · Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider the following array.
Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort the above array in ascending order?

2332456972738997
  1. (A) Selection sort
  2. (B) Mergesort
  3. (C) Insertion sort
  4. (D) Quicksort using the last element as pivot
Answer

Answer (C)

Answer from the official GATE CS 2021 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes