Comparison based sorting

Comparison based sorting

Bubble sort and Insertion sort

Average and worst case time complexity: n^2 
Best case time complexity: n when array is already sorted. 
Worst case: when the array is reverse sorted. 

Selection sort

Best, average and worst case time complexity: n^2 which is independent of distribution of data.

Merge sort

Best, average and worst case time complexity: which is independent of distribution of data.

Heap sort

Best, average and worst case time complexity: which is independent of distribution of data.

Quick sort