• retagged by
752 views

1 Answer

0 0 votes
Insertion sort sorts the elements one by one in incremental manner,

After first pass, first element is sorted.

After second pass, first two elements are sorted.

.

.

After nth pass, all n elements are sorted.
Position:
Show:

Related questions

0 0 votes
1 1 answer
5.6k
5.6k views
Edwees asked Feb 6, 2017
5,580 views
Q.Suppose our aim is to sort an array in ascending order. Which of the following statements is true? 1.Input in ascending order is worst case for both selection sort and ...
0 0 votes
1 1 answer
2.3k
2.3k views
Edwees asked Feb 6, 2017
2,329 views
We have a list of pairs [("Tariq",71),("Brinda",85),("Shweta",71),("Sunita",85),("Salma",72),("Uday",60)], where each pair consists of a student's name and his/her marks ...
0 0 votes
2 2 answers
7.3k
7.3k views
Edwees asked Feb 6, 2017
7,286 views
Which of the following statements is not true? 1.For every fixed strategy to choose a pivot for quicksort, we can construct a worst case input that requires time O(n2). 2...
1 1 vote
1 answers 1 answer
547
547 views
Meenakshi Sharma asked Jul 8, 2017
547 views
out of these how many can be solved by master method and how to solve questions in which master theorems cant be applied