Professional Documents
Culture Documents
Search
Search
search -> x
find the midpoint of the array(array length/2). if x smaller than midpoint, left
side.
else right side. repeat.
**array must be sorted increasing.
linear search :
search -> x
check from the 1st element until it finds x.