Cognizant interview question

binary search find an element in array