Add the code to search a key in a rotated sorted array.