The following is the pseudocode for which type of algorithm?
```
Set first to 0
Set last to the last subscript in the array
Set found to false
Set position to -1
While found is not true and first is less than or equal to last
Set middle to the subscript halfway between array[first] and array[last]
If array[middle] equals the desired value
Set found to true
Set position to middle
Else If array[middle] is greater than the desired value
Set last to middle - 1
Else
Set first to middle + 1
End If
End While
Return position
```
a. linear sort
b. linear search
c. binary search
d. selection sort
e. None of these
c. binary search
You might also like to view...
An effectively formatted worksheet is more approachable and helps readers understand the meaning of values and formulas.
Answer the following statement true (T) or false (F)
The _____ attempts to determine whether a computer can successfully impersonate a human.
Fill in the blank(s) with the appropriate word(s).