Solved SearchInRotatedSortedArrayII

but linear time, not logarithmic