Which of the following is not a stable sorting algorithm ?

This question was previously asked in
NIELIT Scientific Assistant CS 5 Dec 2021 Official Paper
View all NIELIT Scientific Assistant Papers >
  1. Insertion sort
  2. Selection sort
  3. Bubble sort 
  4. Merge sort

Answer (Detailed Solution Below)

Option 2 : Selection sort
Free
NIELIT Scientific Assistant Quantitative Aptitude Mock Test
0.5 K Users
20 Questions 20 Marks 30 Mins

Detailed Solution

Download Solution PDF

The correct answer is Selection sort.

key-point-image Key Points
  • Selection sort is not a stable sorting algorithm.
  • In a stable sorting algorithm, the relative order of equal elements is preserved.
  • Selection sort does not guarantee that the relative order of equal elements will be maintained.
  • This is because Selection sort works by repeatedly finding the minimum element and moving it to the correct position, which can disrupt the order of equal elements.
additional-information-image Additional Information
  • Insertion sort, Bubble sort, and Merge sort are stable sorting algorithms.
  • Insertion sort maintains the relative order of equal elements by inserting elements into their correct position without changing the order of equal elements.
  • Bubble sort preserves the relative order of equal elements by repeatedly swapping adjacent elements to move larger elements to the end of the list.
  • Merge sort maintains the relative order of equal elements by dividing the list into halves, sorting each half, and then merging the sorted halves while preserving the order of equal elements.
Latest NIELIT Scientific Assistant Updates

Last updated on Feb 20, 2025

-> A total number of 113 revised vacancies have been announced for the post of Scientific Assistant in Computer Science (CS), Information Technology (IT), and Electronics & Communication (EC) streams.

-> Online application form, last date has been extended up to from 17th April 2025.

->The NIELT has revised the Essential Qualifications for the post of Scientific Assistant. Candidates must possess (M.Sc.)/ (MS)/ (MCA) / (B.E.)/ (B.Tech) in relevant disciplines.

 

-> The NIELIT Scientific Assistant 2025 Notification has been released by the National Institute of Electronics and Information Technology (NIELIT).

More Sorting Questions

Get Free Access Now
Hot Links: teen patti rummy 51 bonus teen patti all game teen patti tiger teen patti joy vip