Back to Blog

Common Sorting Algorithms

Sorting Algorithms

This is a brief overview of common sorting algorithms used in Data Structures and Algorithms.

Bubble Sort

A simple comparison-based algorithm where adjacent elements are compared and swapped if they are in the wrong order.

Merge Sort

A divide-and-conquer algorithm. It divides the array into two halves, sorts them, and then merges them.

Quick Sort

Also a divide-and-conquer algorithm. It picks a 'pivot' element and partitions the other elements into two sub-arrays, according to whether they are less than or greater than the pivot.