Solved SearchInRotatedSortedArray in java