solution to Search in Rotated Sorted Array