Both sorting techniques maintains two sub-lists, sorted and unsorted and
both take one element at a time and places it into sorted sub-list.
Insertion sort works on the current element in hand and places it in the
sorted array at appropriate location maintaining the properties of
insertion sort. Whereas, selection sort searches the minimum from the
unsorted sub-list and replaces it with the current element in hand.
No comments:
Post a Comment