Question: Please complete the following 3 questions in java 11. Mark true or false and explain: (a) If the original array was already sorted, 190 comparisons
11. Mark true or false and explain: (a) If the original array was already sorted, 190 comparisons would be performed in a Selection Sort of an array containing 20 elements. (b) Mergesort works faster than Insertion Sort on any array. 12. An array of six integers - 6, 9, 74, 10, 22,81 is being sorted in ascending order. Show the state of the array after two iterations through the outer for loop in Selection Sort (as shown in Figure 14-5). 13. What are the values stored in an array a after five iterations in the for loop of the Insertion Sort (as shown in Figure 14-6) if the initial values are 3, 7, 5, 8, 2, 0, 1, 9, 4, 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
