Python Program for Binary Insertion Sort
We can use binary search to reduce the number of comparisons in normal insertion sort. Binary Insertion Sort find use binary search to find the proper location to insert the selected item at each iteration. In normal insertion, sort it takes O(i) (at ith iteration) in worst case. we can reduce it to O(logi) by using binary search.
Time Complexity: O(n2) The algorithm as a whole still has a worst case running time of O(n2) because of the series of swaps required for each insertion.
Auxiliary Space: O(logn)
Please refer complete article on Binary Insertion Sort for more details!