solve the search in rotated sorted array II problem.