Walmart Global Tech interview question

search an element in a sorted and rotated array