First attempt: sort them and add the 2 largest numbers 2nd attempt: find 1st and 2nd largest number and add them.
On Wed, Jul 14, 2010 at 7:27 AM, Debajyoti Sarma <sarma.debajy...@gmail.com>wrote: > An array contains the set of positive integer. Find the largest number > c such that c=a+b where a,b,c are distinct number of the set? > [Consider , reducing complexity] > > -- > 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.