Pergunta de entrevista da empresa Samsung Research America

Coding: Array problem to find max distance amongst elements based on some criteria