1.

How many passes does an insertion sort algorithm consist of?(a) N(b) N-1(c) N+1(d) N^2This question was addressed to me during an online interview.The origin of the question is Insertion sort topic in portion Sorting of Data Structures & Algorithms II

Answer» CORRECT option is (b) N-1

Best explanation: An insertion ALGORITHM consists of N-1 PASSES when an ARRAY of N elements is given.


Discussion

No Comment Found

Related InterviewSolutions