Sorting Algorithms

Bubble Sort

It is a simple sorting algorithm that compares each pair of adjacent items and swaps them if they are in the wrong order. But it is very slow way of sorting. The main disadvantage of the bubble sort is that is not the fastest sort.


Merge Sort

  • Advantages: Stable and good for sorting slow data.
  • Disadvantages: Uses a lot of memory and takes twice as long / it’s slow


Quick Sort