max(j-i) such that a[i]<a[j]