Page 4 of 11 COP2220 Summer 2017-Final 07/07/17 20 The sort in which t is called
ID: 3854783 • Letter: P
Question
Page 4 of 11 COP2220 Summer 2017-Final 07/07/17 20 The sort in which t is called element from the unsorted sublist is transferred to the sorted sublist at its sorted location is called a bubble sort b selection sot d. merge sort e binary sort Your answer an array order after two passes of bubble sort, if the initial array 22 38 57 126 91 10 63 21 What would be the contents of an array order after two passes contents are as shown below? 2 30 57 20 01 10 63 c 22 38 57 26 10 91 63 22 3 38 57 20 91 10 122 38|57 | 26 | 91 | 10 | 63 C. 22 38 57 26 10 | 91 | 63 d. 10 22 26 57 38 63 91 e- 22 63 38 57 26 | 91 | 10 2 6 9 57120 9110 Your answer 22. What would be the contents of an array order after two passes of selection sort, if the initial array contents are as shown below? 22 3857 26 91 10 63 a. 10 38 57 26 91 22 63 b. 10 22 57 26 91 38 63 10 22 26 38 57 63 91 d. 22 38 57 26 91 10 63 e. 22 63 38 57 26 91 10 10 2 $7 23 01 36 42 8 57 33 1 2 63 38 57 20 91 10 Your answer Dr. Asaithambi The University of North Florida School of ComputingExplanation / Answer
20. BUBBLE SORT.
The sorting technique is one of the simplest sorting technique which keeps on swapping as the unsorted element appears to it.
21. b 10,22,26,38,57,63,91
The swapping technique used is bubble sort hence, when we look at the initial array 22 is the number which is swapped continuously to bring it on the sorted side is the first pass and the second pass brings 26 on the sorted side leaving the whole array sorted.
22. b 10,22,57,26,91,38,63
The swapping technique used is selection sort which aorts the minimum number in the array and brings it to the front. Hence,in the given array the number 10 is the smallest number which is swapped with the number 22 in the front and in the second pass the number 22 is swapped with 38 and resulting into the above solution.
Please rate the answer if it helped.....Thankyou
Hope it helps......
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.