update solution for search in rotated sorted array.