Explain the sentence: The selection sort algorithm not only does comparisons; it also does exchanges.
What will be an ideal response?
Even if the largest number in the unsorted section of a list is already at the end of the unsorted section, the selection sort algorithm exchanges this number with itself. Therefore, the algorithm does n exchanges, one for each position in the list to put the correct value in that position. With every exchange, the marker gets moved. (However, the work contributed by exchanges and market moving is so much less than the amount contributed by comparisons that it can be ignored.)
You might also like to view...
A(n) __________ is used as an index to pinpoint a specific element within an array.
a. boolean value b. element c. argument d. subscript
The commands in this tab of the Properties dialog box are used to change the appearance of the values on the PivotTable:
A) Properties. B) Formula. C) Format. D) Captions.
When creating random numbers, the second argument passed to the Next method is _________
a) equal to the maximum value you wish to be generated b) equal to one more than the maximum value you wish to be generated c) equal to one less than the maximum value you wish to be generated d) equal to the minimum value you wish to be generated
When working with an email account, you can set ____ default signatures.
A. two B. three C. four D. five