Question:The usual θ(n^2) implementation of Insertion Sort to sort an array uses linear search to identify the position where an element is to be inserted into the already sorted part of the array. If, instead, we use binary search to identify the position, the worst case running time will

A: remain θ(n^2)
B: become θ(n(log n)^2)
C: become θ(n log n)
D: become θ(n)

Ans: A
Solution: If we use binary search then there will be log2(n!) comparisons in the worst case, which is θ(n log n)  But the algorithm as a whole will still have a running time of θ(n^2) on average because of the series of swaps required for each insertion.