 Efficient sorting is important for optimizing the efficiency of other algorithms (such as search and merge algorithms) that require input data to be in sorted lists.Sorting is also often useful for canonicalizing data and for producing human-readable output.More formally, the output of any sorting algorithm must satisfy two conditions