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

Information All the questions below refer to the same array. You have to type yo

ID: 3869257 • Letter: I

Question

Information All the questions 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 4 2 1 36 So if the question was to type in the initial array, you would enter 4 2 1 36 And if the question was what is the sorted array, you would answer 1 2 346 Question 1 (1 point) What is the contents of the array after 1 pass of insertion sort (into ascending order?) A single pass includes inserting the selected element in it's correct position Save Question 2 (1 point) What is the contents of the array after 2 passes of insertion sort (into ascending order?) A single pass includes inserting the selected element in it's correct position Save Question 3 (1 point) What is the contents of the array after 3 passes of insertion sort (into ascending order?) A single pass includes inserting the selected element in it's correct position

Explanation / Answer

1. after 1st pass:

array will be : 2 4 1 3 6

2. after 2nd pass:

array will be: 1 2 4 3 6

3. after 3rd pass:

array will be : 1 2 3 4 6

4. after 4th pass :

array will be : 1 2 3 4 6

5. false, the insertion sort runs for every element of the array even if it is sorted. it's time complexity is order of n, least for sorted elements.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote