Suppose we have two sorted arrays: A and B of size n.
We would like to know if there is such a pair of indexes (i,j) that A[i] + B[j] = C.
C is a given number.
What’s the best worst-case time complexity (Big Oh) of the algorithm to solve the problem?

Advertisements