Single Choice Easy

QWhich of the following sorting algorithms is stable?

ID: #5696 Sorting algorithm 173 views
Question Info
#5696Q ID
EasyDifficulty
Sorting algorithmTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Selection sort
  • B Quick sort
  • C Insertion sort
  • D Heap sort
Correct Answer

Explanation

Insertion sort is a stable sorting algorithm, meaning that it preserves the relative order of equal elements in the sorted output. When two elements have equal keys, their original order is maintained after sorting. In contrast, selection sort, quick sort, and heap sort do not guarantee this property.

Share This Question

Challenge a friend or share with your study group.