There is an integer array nums sorted in non-decreasing order, not necessarily with distinct values. The array is rotated at an unknown pivot such that the resulting array may start from any index of the original array. Given this rotated array and an integer target, determine if target is present in nums. The goal is to decrease the overall operation steps as much as possible.
Click Run to execute sample tests.