answersLogoWhite

0


Best Answer

The difference between selection sort and insertion sort is simple: selection sort is an in place sort, while insertion sort builds the sorted array one element at a time.

Selection sort:

[10, 6, 1, 23, 56, 22, 3, 17]

[1, 10, 6, 23, 56, 22, 3, 17]//1 is placed in its final correct position

[1, 3, 10, 23, 56, 22, 6, 17]//3 is placed in its final correct position

[1, 3, 6, 23, 56, 22, 10, 17]//6 is placed in its final correct position

[1, 3, 6, 10, 56, 23, 22, 17]//10 is placed in its final correct position

[1, 3, 6, 10, 17, 56, 23, 22]//17 is placed in its final correct position

[1, 3, 6, 10, 17, 22, 56, 23]//22 is placed in its final correct position

[1, 3, 6, 10, 17, 22, 23, 56]//23 is placed in its final correct position

Insertion sort:

[10, 6, 1, 23, 56, 22, 3, 17]

[6, 10, 1, 23, 56, 22, 3, 17]//The first two elements of the list are correctly sorted

[1, 6, 10, 23, 56, 22, 3, 17]//The first three elements of the list are correctly sorted

[1, 6, 10, 23, 56, 22, 3, 17]//The first four elements of the list are correctly sorted

[1, 6, 10, 23, 56, 22, 3, 17]//The first five elements of the list are correctly sorted

[1, 6, 10, 22, 23, 56, 3, 17]//The first six elements of the list are correctly sorted

[1, 3, 6, 10, 22, 23, 56, 17]//The first seven elements of the list are correctly sorted

[1, 3, 6, 10, 17, 22, 23, 56]//The eight elements of the list are correctly sorted

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Sort the following list using selection sort and insertion sort show the list after each it eration and this is the list 10 6 1 23 56 22 3 17?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Using doublelinked list insertion sort in c language?

using doublelinked list insertion sort in c language


Using only one program implement bubble sorting insertion sorting quick sorting and selection sorting?

Its simple!dirve a menu based prog by using switch case & then apply every sorting function to it.


Who invented insertion sort?

There are no records of when insertion sort was invented because people have been sorting things using the insertion sort and selection sort algorithms since before records began; they are ancient algorithms. You cannot be credited for creating an algorithm that already exists. Shell sort, which is a refinement of insertion sort, was developed much later, in 1959 by Donald Shell. His algorithm can be credited because it takes advantage of a computer's processing abilities, whereas insertion sort and selection sort rely purely on a human's processing abilities.


How do you improve insertion sort algorithm?

If there was a way, it would be the new insertion sort! Theoretically you could reduce the time by using a linked list and searching to the position it needs to be inserted and inserting it. In practice however you would be better off simply using a different sort, especially if you don't want your data in a linked list. Selection sort is better when writing is expensive. Quicksort and Mergesort are faster on large data sets.


Write A program to implement insertion using AVL trees?

yes


Ignou mca solved assignment of 3rd sem Jan 2009 free?

Sort the following list of numbers in the descending order, 187, 62, 155, 343, 184, 958, 365, 427, 78, 94, 121, 388 using each of the following methods: (i) Insertion Sort (ii) Selection Sort (iii) Heap Sort (iv) Merge Sort (v) Quick Sort Further, count the number of operations, by each sorting method.


Which outcome is possible using genetic engineering but not using selective breeding?

The insertion of a [desired] gene segment into an existing chromosome.


How do you sort a link list?

You copy the list, while using an insertion sort criteria.


How insertion is done using relational algebra?

lund pakad ke naach mera madarchode


How do you delete backgrounds of any image other than a gif using the fuzzy select tool on GIMP?

Using a layer mask, using path tool, convert path to selection, invert selection, fill selection in mask with black


What is a good sentence using the word selection process?

While I was in line I was also in a selection process.


Where can I find an outdoor storage shed?

Yes, you can order plans for a backyard shed using your American Express card on the following website: http://www.designer-shed-plans.com/. They have a good selection.