solve searh in rotated sorted array 2 and rotate list