here is an array A[1 to n] of numbers. You need to find the min
index i such that A[ i ] + A[ j ] = M , where M is a given constant
and i < j <= n. The complexity of the algo shd be O(n).
Can anyone please tell me the idea ?
Thank You,
index i such that A[ i ] + A[ j ] = M , where M is a given constant
and i < j <= n. The complexity of the algo shd be O(n).
Can anyone please tell me the idea ?
Thank You,
Comment