I have an interview question that I can't seem to figure out. Given an array of size N, find the subset of size k such that the elements in the subset are the furthest apart from each other.
Example:
Array = [1,2,6,10]
k = 3
answer = [1,6,10]
UPDATE : meaning of furthest apart : the difference b/w any two elements in the subset is mimimum .