MC: How many comparisons will a linear search function makes before finding a match if the search key has a value of 3 and the array x has the values:
```
x[ 0 ] = 0
x[ 1 ] = 2
x[ 2 ] = 1
x[ 3 ] = 4
x[ 4 ] = 3
x[ 5 ] = 3
```
(a) 3
(b) 4
(c) 5
(d) 6
(c) 5
You might also like to view...
The binary search algorithm in the text makes recursive on subarrays of the array passed to the algorithm. The index values of the array the algorithm searches run from first to last. The subarrays are dermined using the mid-point. How is the mid point calculate?
a) ``` mid = (first - last)/2; ``` b) ``` mid = (first + last)/2; ``` c) ``` mid = (first + last)%2; ``` d) ``` mid = (first - last)%2; ```
The circles in the figure above were created with the Offset Path command.
Answer the following statement true (T) or false (F)
Deleted records or fields:
A) can be undone by the "re-add" box B) can be undone by the "undo" box. C) can be undone by the "reverse warning" box D) cannot be undone.
The BETWEEN operator is an essential feature of SQL.
Answer the following statement true (T) or false (F)