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:

c++ programming questions: The selection sort continues until ______________ of the n

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!