Add solution to linear and recursive binary search.