Enhancing adaptability of Insertion sort through 2-Way expansion
Kamlesh Nenwani, Vanita Manikrao Mane, Smita Bharne · 2014
A Sorting algorithm is termed as adaptive when it is capable of making the use of existing ordering among the elements. Most of the sorting algorithms are adaptive when the ordering among the elements is in required order and perform well. But, if the ordering among the elements is in reverse order (i.e. not in required order) then these sorting algorithms depict their worst case behavior. In this paper, we propose Adaptive Insertion Sort (AIS) algorithm which is capable of making the use of ordering among the elements either in required or reverse order. The correctness of the algorithm is shown in graphs with respect to number of comparisons and number of shifts required by AIS and Insertion sort.