clojure-hackos.minimum-distances

Solution to the Minimum Distances challenge. See: https://www.hackerrank.com/challenges/minimum-distances

min-distance

(min-distance arr)

Groups the given array into pairs of equal elements and returns the smallest difference between their indices. Returns -1 if no matching pairs are found.