I got a question that which type of sorting algorithm will have least time complexity when we are given an already sorted array.
Sounds like a homework question, but I'd say one very simple algorithm that is time efficient on sorted or only slightly unsorted lists is bubble sort. Sorted, the time complexity is O(n). That said, there are many sorting algorithms that have similar time complexity for the best case scenario (i.e. already sorted), and bubble sort has a worst case of O(n2).