Impact of Ascending and Descending Input Patterns on Sorting Techniques
Aman Khan, Rohini Nag, Subhashis Majumder · 2014
Sorting is a process of arranging elements in an orderly manner, based on the value of a certain key which exists for each element. This key may be the value of the element itself or some other property associated with it. Sorting plays an important role in computer science as it is often performed, either in a solitary manner or as a part of some other algorithm. Thus its efficiency in terms of time and space is a crucial factor. Given a sequence of n elements, the number of comparisons required to sort them in the ascending order will be different than that of the number required for descending order. The objective of this paper is to analyze the performance of different sorting techniques with respect to the ascending and descending patterns in the elements to be sorted and to determine the importance of being able to predict whether it will be easier to sort the elements in ascending order or descending order.