Criteria for analysis

  • Number of comparisons
  • Number of swaps
  • Adaptive behaviour – Checking if the data structure is already sorted or completely unsorted
  • Stable – Maintaining order of duplicate values in sorted data structure
  • Extra memory – Space Complexity

Sorting algorithms

Comparison based sorting(More time complexity, less space complexity)

  1. Bubble sort
  2. Insertion sort
  3. Selection sort
  4. Heap sort
  5. Merge sort
  6. Quick sort
  7. Tree sort
  8. Shell sort

Index based sorting (More space complexity, less time complexity)

  1. Count sort
  2. Bucket/Bin sort
  3. Radix sort

Other sorting algorithms

Count sort in C/C++

Merge sort in C/C++

Quick Sort in C/C++

Selection sort in C/C++

Insertion Sort in C/C++

Bubble Sort in C/C++

Criteria for sorting analysis

LEAVE A REPLY