Amazon Interview Question

top k minimum distances in array