Let three integer arrays, A, B, and C, be given, each of size n. Given an arbitrary integer k, design an O(n2 logn)-time algorithm to determine if there exist numbers, a in A, b in B, and c in C, such that k = a+b+c.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.