Merge sort is an efficient, stable sorting algorithm that divides the array, sorts sub-arrays, and merges them. It has a time complexity of O(n log n) and is ideal for large datasets.
Show meInsertion sort builds a sorted array one element at a time by inserting elements into their correct positions. It has a time complexity of O(n^2) and is best for small or nearly sorted datasets.
Show meBubble sort repeatedly compares and swaps adjacent elements to sort the list. With a time complexity of O(n^2), it is simple but inefficient for large datasets, best for small or nearly sorted arrays.
Show meSelection sort repeatedly finds the minimum element and moves it to the beginning of the list. It has a time complexity of O(n^2) and is simple but inefficient for large datasets.
Learn MoreQuick sort is an efficient algorithm that partitions the array around a pivot and recursively sorts sub-arrays. It has an average time complexity of O(n log n) and is fast for large datasets but not stable.
Learn More