Domanda di colloquio di Pramp

Given a sorted array, return the first element that matches the index