Carefully read the question first.
The condition they provided
i>j,(A[i+1]−A[i])>(A[j+1]−A[j])
this simply means the sequence of differences D must be strictly increasing.
you might get confused because of the use of i,j here even i got confused there but the catch is we dont need to compare each differences.We just have to check the neighbours .
Analogy- Think of it like checking if a line of people is sorted by height. You don,t need to compare person at position 1 to positon 9 or person at 2 to person 7. You can simply compare the current and next person and achieve the sorted line height wise.
so here also checking consecutive pair of differences is enough.
Algorithm:
Walk through the array once computing each consecutive differences.
check if each difference is bigger than the previous one.
if yes throughout condition holds,if no somewhere then the condition fails that's it.
This is just one pass through the array, so it takes O(n) time. You cannot do it faster than this because you have to check every element atleast once to be sure.