Given three arrays, find elements a,b,c such that a+b=c.

Revision en1, by bukunu, 2018-06-22 22:28:30

Asked in a Finance Company Interview :

Given three unsorted arrays A,B and C, the task is to find three elements a,b,c from the three arrays such that a+b=c.

Can it be done in O(nlogn)?

Suppose the arrays are given as sorted, then can it be done in linear time?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English bukunu 2018-06-22 22:28:30 328 Initial revision (published)