Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

All the question below refer to the same array. You have to type your answer on

ID: 3560309 • Letter: A

Question

All the question below refer to the same array. You have to type your answer on a single line with one space between each number to get it correct. The initial array is 2 3 4 5 6 7 8 1 So if the question was to type in the initial array, you would enter 2 3 4 5 6 7 8 1

Question 1 What is the contents of the array after 1 pass of selection sort (into ascending order?) A single pass includes both a search and a swap.

Question 2 What is the contents of the array after 2 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

Question 3 What is the contents of the array after 3 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

Question 4 What is the contents of the array after 4 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

Question 5 What is the contents of the array after 5 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

Question 6 What is the contents of the array after 6 passes of selection sort (into ascending order?) A single pass includes both a search and a swap. Question 6 options: Save

Explanation / Answer

All the question below refer to the same array. You have to type your answer on a single line with one space between each number to get it correct.
The initial array is 2 3 4 5 6 7 8 1 So if the question was to type in the initial array, you would enter 2 3 4 5 6 7 8 1

Question 1 What is the contents of the array after 1 pass of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 3 4 5 6 7 8 2 (since 1 is minimun it will be swapped with 2)

Question 2 What is the contents of the array after 2 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 2 4 5 6 7 8 3 (here 2 is minimun it will be swapped with 3)

Question 3 What is the contents of the array after 3 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 2 3 5 6 7 8 4 (here 3 is minimun it will be swapped with 4)

Question 4 What is the contents of the array after 4 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 2 3 4 6 7 8 5 (here 4 is minimun it will be swapped with 5)

Question 5 What is the contents of the array after 5 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 2 3 4 5 7 8 6 (here 5 is minimun it will be swapped with 6)

Question 6 What is the contents of the array after 6 passes of selection sort (into ascending order?) A single pass includes both a search and a swap.

1 2 3 4 5 6 8 7 (here 6 is minimun it will be swapped with 7)

after last swap array will be. 1 2 3 4 5 6 7 8