LightBox interview question

how to search for an elements in a array with minimal time complexity