Its a repeated question. Kindly search the archives for detailed discussion.
Anurag Sharma On Wed, Jun 23, 2010 at 10:55 PM, Amir hossein Shahriari < amir.hossein.shahri...@gmail.com> wrote: > sort the array > for each element a[i] > find two elements that sum to -a[i] (this can be done in O(n) ) > > the overall time is O(n^2) > > On 6/23/10, Raj N <rajn...@gmail.com> wrote: > > Given a list of n integers?(negative and positive), not sorted and > > duplicates allowed, you have to output the triplets which sum upto 0. > > > > -- > > 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<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.