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 <[email protected]> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to