Which sorting algorithm is best for an already (almost) sorted array?

2025

Which sorting algorithm is best for an already (almost) sorted array?

  1. A.

    Merge sort

  2. B.

    Quick sort

  3. C.

    Insertion sort

  4. D.

    Heap sort

Attempted by 86 students.

Show answer & explanation

Correct answer: C

Insertion sort performs very well on already sorted or almost sorted arrays because few shifts are needed.

Explore the full course: Coding For Placement