Struck in problem?

Правка en1, от Snapper_001, 2022-07-25 21:35:11

We are given an array of size n and we have to determine if it is possible to arrange the elements in such a way that the absolute difference between two adjacent elements is 1.The first and the last element are also considered adjacent. for example, for array A=[1,2,3,2] the answer is YES. Thanks in advance.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Snapper_001 2022-07-25 21:35:11 328 Initial revision (published)