Find three elements in an integer array satisfying i < j < k and A[i] < A[j] < A[k] in O(n).