in Algorithms retagged by
412 views
0 votes
0 votes
Insertion sort uses an incremental approach  for designing algorithm can someone please explain?
in Algorithms retagged by
412 views

1 Answer

0 votes
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.

1 comment

@vinay, then Selection Sort or Bubble sort is also follow this.

in my opinion ( i am not sure )

incremental means, insertion sort always insert a element in sorted array.
0
0

Related questions