ayushkumar225's blog

By ayushkumar225, history, 6 weeks ago, In English

I got struck in this problem and any help would be 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.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by ayushkumar225 (previous revision, new revision, compare).