Cross-Array Two Sum on Sorted Vectors

Given two non-decreasing sorted integer arrays a and b, and an integer target, choose one element from each array. Determine whether there is a pair (a[i], b[j]) such that:

a[i] +...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: