given an array of numbers and an integer x, distribute x such that the difference between any pairs is minimum possible.
eg arr = [4,2,0] and x = 10;
ans should be [6,5,5];
it is obligatory to use x.
Aucun commentaire:
Enregistrer un commentaire