solution is that check if there is an entry in the array from i=2 to i=n-1;↵
such that a[i]<a[i-1]&&a[i]<a[i+1].↵
If there is such a value ans is NO else ↵
answer is always "YES". This is an easy way to solve that problem.... OK................
such that a[i]<a[i-1]&&a[i]<a[i+1].↵
If there is such a value ans is NO else ↵
answer is always "YES". This is an easy way to solve that problem.... OK................