Insertion sort as there is no movement of data if the list is already sorted and complexity is of the order O(N).
Which sorting algorithm is best if the list is already sorted? Why?
September 14, 2023 in Data Structure
September 14, 2023 in Data Structure
Insertion sort as there is no movement of data if the list is already sorted and complexity is of the order O(N).