You are on page 1of 1

binary 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.

You might also like