search in rotated sorted array
solution explanation