You haven't succeeded in this at all.Find out all possible (i,j,k) such that A[i]+B[j]=C[k].
You algorithm overrides values so that only one possible match for each `C[K]' is logged.
You can get better than "O(n*log(n))" without assuming weird constraints which are probably not intended.Any O(N*logN) or better algorithm for this ?
Show us your version that is based on sorting and searching.I have already tried with sorting.Can you elaborate please ?
Soma