Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. How many many passes through the data will be made by the selection sort for

ID: 3550760 • Letter: 1

Question

1. How many many passes through the data will be made by the selection sort for N data items?


2. How many numbers are placed in order on each pass through the data (each iteration of the inner loop) for the selection sort? (Enter a numeral.)


3. If an array is sorted in ___ order, the values are stored from highest to lowest.


4. The maximum number of comparisons that a binary search function will make when searching for a value in a 2,000-element array is:

(Enter a numeral)


5. A binary search will find the value it is looking for with just one comparison if that value is stored in the ______ array element.

Explanation / Answer

(A) n-1


(B) 1


(C) Descending


(D) log 2000(base 2) = 11


(E) middle