Solved SearchInRotatedArray problem