add solution for search rotated array