Hi, i have a set of integers for example: {0,1,3,100,102} and i am looking for a maximum subset in which all elements have a minimum distance to all elements (or the "next" doesnt matter i guess) for my example ({0,1,3,100,102}) and the distance 3 the result could be: {0,3,100} for distance 2 it could be: {0,3,100,102}
Is there an "good" algorithm to do that ?
(This is my first post, sry when i chose the wrong tag)