Domanda di colloquio di Schneider Electric

Find the minimum distance between given two elements in an array.