Avik, yes the answer is obvious but your code doesn't find that. that 2 pointer approach is the correct one.
On Tue, Aug 10, 2010 at 12:07 AM, Avik Mitra <tutai...@gmail.com> wrote: > @Sekin. > > Sort the elements (increasing order). This has already been mentioned. > So, answer will be 1, 100. > > -- > 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.