Question: c++ programming questions: The selection sort continues until _____ of the n items in an array have been swapped. a) n/2 b) n - 2
c++ programming questions:

The selection sort continues until _____ of the n items in an array have been swapped. a) n/2 b) n - 2 c) n - 1 d) n Given the following array: 4 15 8 3 28 21 which of the following represents the array after the second swap of the selection sort? a) 4 3 8 15 21 28 b) 4 15 8 3 21 28 c) 3 4 8 15 21 28 d) 21 4 3 8 15 28 Given the fact that a selection sort of n items requires n^2/2 + 5 * n/2 - 3 major operations, the selection sort is _____. a) O(1) b) O(n) c) O(n^2) d) O(log_2 n) The _____ compares adjacent items and exchanges them if they are out of order. a) selection sort b) binary search c) bubble sort d) quicksort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
