• + 0 comments

    i think the question asks that a number be chosen from the array such that the difference between any 2 chosen numbers is less than 2. for example, s = [4,6,7,4,6,4,6] here, if 6 is chosen, then 7 is next number to choose.then, the next number n sould be such that |7-n| <2 and |6-n|<2