traverse array with 2 elements keeping track of 2 min elements. time
O(n) space O(1)

On Jul 11, 9:34 pm, Amit Jaspal <amitjaspal...@gmail.com> wrote:
> Constraint - O(n)
>
> On Sun, Jul 11, 2010 at 9:24 AM, amit <amitjaspal...@gmail.com> wrote:
> > Given an array of size n.find 2 numbers from array whose difference is
> > least.
>
> > --
> > 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.
>
> --
> Amit Jaspal
> Btech IT IIIT- Allahabad

-- 
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.

Reply via email to