The usual Θ(n2) implementation of Insertion Sort to sort an array uses linear…
PYQ GATE 2003
The usual Θ(n2) 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 Θ(n2)
- B.
become Θ(n (log n)2)
- C.
become Θ(n log n)
- D.
become Θ(n)
Attempted by 876 students.
Sign up free to check your answer
Sign up freeLoading lesson…

