Comparison-based sorting is a method of arranging items by comparing them to one another. This technique relies on a set of rules to determine the order of elements, such as whether one item is greater than, less than, or equal to another. Common algorithms that use this approach include QuickSort, MergeSort, and Bubble Sort.
These algorithms work by repeatedly comparing pairs of elements and rearranging them based on the results of those comparisons. The efficiency of comparison-based sorting is often measured in terms of time complexity, with the best possible performance being O(n log n) for most algorithms in the average case.