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

Правка en1, от 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский bukunu 2018-06-22 22:28:30 328 Initial revision (published)