Consider the following array. Which algorithm out of the following options…

PYQ GATE 2021

Consider the following array.

image.png

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 ?

  1. A.

    Selection sort

  2. B.

    Merge sort

  3. C.

    Insertion sort

  4. D.

    Quicksort using the last element as pivot

Attempted by 638 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…