Cognizant interview question

Searching algoritm