Represent in a binary search algorithm
Question 1
What does the variable middle represent in a binary search algorithm?
 Subscript of the midpoint
 Middle value in the array
 Middle value in the portion to be searched
 The average of two values
 None of these
Question 2
As the ________ sorting algorithm makes passes through and compares the elements of the array, certain values move toward the end of the array with each pass.
 Bubble
 Selection
 Insertion
 Hash
 None of these
Question 3Which sorting algorithm moves elements to their final sorted position in the array?
 Bubble
 Selection
 Insertion
 Hash
 None of these
Question 4
Which statement is true after the execution of the following statements?
 x and y contain their original values
 x and y swapped their values
 x contains the value in y and y stayed the same
 y contains the value in x and x stayed the same
 None of these
Question 5
Which search algorithm uses three variables to mark positions within the array as it searches for the searchValue?
 Sequential
 Binary
 Parallel
 Linear
 None of these
Question 6
 To order an array of strings in alphabetic order, the sorting algorithm should be structured for ________ orde
 alphabetic
 numeric
 ascending
 descending
 None of these
Question 7
In a selection sort, which variable holds the subscript of the element with the smallest value found in the scanned area of the array?
 minIndex
 minValue
 startScan
 SIZE
 None of these
Question 8
When the elements in an array are stored from lowest to highest, the array is sorted in ________ order.
 Ascending
 Descending
 Numeric
 Alphabetic
 None of these
Question 9
Which searching algorithm requires the array to be ordered?

Rating:
5/