Bubble Sort
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. It has a worst-case and average-case time complexity of O(n^2).
Explore bubble sort AlgorithmInsertion Sort
Insertion sort is a simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists compared to more advanced algorithms such as Merge Sort and Quick Sort. It has a worst-case and average-case time complexity of O(n^2).
Explore Insertion sort AlgorithmSelection Sort
Selection sort is a simple in-place comparison-based sorting algorithm. It has an average-case and worst-case time complexity of O(n^2).
Explore Selection sort AlgorithmMerge Sort
Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts each half, and then merges the sorted halves to produce the final sorted array. It has an average-case and worst-case time complexity of O(n log n).
Explore Merge sort AlgorithmQuick Sort
Quick sort is a divide and conquer sorting algorithm that works by selecting a pivot element from the array and partitioning the other elements into two sub-arrays according to whether they are less than or greater than the pivot. It has an average-case time complexity of O(n log n) and a worst-case time complexity of O(n^2).
Explore Quick sort Algorithm