+1 vote
in Data Structures & Algorithms II by (110k points)
For the best case input, the running time of an insertion sort algorithm is?

(a) Linear

(b) Binary

(c) Quadratic

(d) Depends on the input

This 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

1 Answer

+1 vote
by (614k points)
selected by
Best 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).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.