+1 vote
in Data Structures & Algorithms II by (110k points)
In C, what are the basic loops required to perform an insertion sort?

(a) do- while

(b) if else

(c) for and while

(d) for and if

This question was posed to me by my school teacher while I was bunking the class.

The doubt is from Insertion sort in division Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
Best answer
Right answer is (c) for and while

For explanation: To perform an insertion sort, we use two basic loops- an outer for loop and an inner while loop.

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.