Help needed in a problem

Правка en1, от ayushkumar225, 2021-10-23 20:28:39

I got struck in this problem and any help would we appreciated:).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. Язык Кто Когда Δ Комментарий
en2 Английский ayushkumar225 2021-10-23 20:32:51 4 Tiny change: 'elp would we appreciated:).We are gi' -> 'elp would be appreciated.We are gi'
en1 Английский ayushkumar225 2021-10-23 20:28:39 405 Initial revision (published)