Question: 1. The bubble sort: a. Finds the smallest value and exchanges it with the first value, then continues with the second value, third value, etc.
1. The bubble sort:
a. Finds the smallest value and exchanges it with the first value, then continues with the second value, third value, etc.
b. Is a system of comparisons and exchanges of adjacent elements to move the largest to the bottom of the selected group of values.
c. Is a system of comparisons and exchanges of elements that are non-adjacent. The gap is halved at each pass.
d. None of the above.
For the following array answer Q2
Element Values
1 15
2 23
3 17
4 12
5 65
2.Use the selection exchange method to show the first pass (chose one):
a. 12, 17, 23, 15, 65
b. 12, 23, 17, 15, 65
c. 15, 17, 12, 23, 65
d. 17, 15, 12, 23, 65
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
