Find element in a rotated sorted array. Ex: array = [6,7,8,9,2,3,5] target = 3 If the given array would be normal sorted array then we could easily apply binary search. An intuitive solution to this problem is to find the pivot point, In the given example its index 3. Now…