Domanda di colloquio di LightBox

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