Advanced Database Management System - Tutorials and Notes: Sorting algorithms compared on stable, in-place, comparison properties

Search Engine

Please visit, subscribe and share 10 Minutes Lectures in Computer Science

Tuesday, 27 February 2018

Sorting algorithms compared on stable, in-place, comparison properties

Sorting algorithms compared on stable, in-place, and comparison properties


Stable sort - Sorting stability means that records with the same key retain their relative order before and after the sort.

 

In-place sort - A sort algorithm in which the sorted items occupy the same storage as the unsorted ones is in-place sort algorithm.

 

Comparison sort - It is an algorithm that compares two keys (values) and nothing else to find which one should appear first in the sorted list. 


Sorting algorithm
Stable?
Comparison?
In-place?
Quick sort
NO
YES
YES
Merge sort
YES
YES
NO
Heap sort
NO
YES
YES
Insertion sort
YES
YES
YES
NO
YES
YES
Bubble sort
YES
YES
YES
Least Significant Digit Radix sort
YES
NO

Most Significant Digit Radix sort
NO
NO
YES
Shell sort
NO
YES
YES

**********

What is In-place sort? 

What is stable sort?





compare different sorting algorithms on stable property, in-place property and comparison property,


No comments:

Post a comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents