• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE-CS-2003 | Question 22

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 1) 2) 3) become Θ(n log n) 4) become Θ(n)

(A)

remain Θ(n2)

(B)

become Θ(n (log n)2)

(C)

become Θ(n log n)

(D)

become Θ(n)

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments