1.

For the best case input, the running time of an insertion sort algorithm is?(a) Linear(b) Binary(c) Quadratic(d) Depends on the inputThis question was posed to me by my college director while I was bunking the class.I'd like to ask this question from Insertion sort in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct CHOICE is (a) Linear

To explain: The best case INPUT for an insertion sort ALGORITHM runs in linear TIME and is given by O(N).



Discussion

No Comment Found

Related InterviewSolutions