ok. Suppose you have 3 pointers i, j, k point to the element in A, B, C respectively. Initialize i = j =k = 0. for each step, you will compare A[i], B[j], C[k]. if A[i] is the smallest, i++ if B[j] is the smallest, j++ if C[k] is the smallest, k++ (this assumes numbers in A,B,C are unique, you should be able to eliminate this restriction by changing above logic a little bit.)
for each step compute the current triple distance and keep the minimum. Thanks On Sun, Dec 19, 2010 at 9:51 PM, Saurabh Koar <saurabhkoar...@gmail.com>wrote: > @yq: Heyy yq..I m not interested in what is equivalent to what and > what is not not equivalent to what..I m interested to a specific > optimized algorithm for the specific problem stated above.If u can > figure out equivalence u can also devise the algorithm for the above > problem.Nw would u please state that??or provide any link?? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.