Can we modify the array???we can make index we visit as negative and then
if any one already containing -ve..then its repeating

On Wed, Oct 31, 2012 at 1:40 AM, Don <[email protected]> wrote:

> Does your algorithm work if N=4 and the array is {1,1,2,2}.
>
> Don
>
> On Oct 30, 2:32 pm, arumuga abinesh <[email protected]> wrote:
> > if sum of all elements = n(n-1)/2 , no elements are repeated
> > else some numbers are repeated
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Oct 30, 2012 at 11:57 PM, Don <[email protected]> wrote:
> > > Given an array of N integers in the range 0..N-1, determine if any
> > > number is repeated in the array.
> > > Solution should execute in O(n) time and use constant space.
> > > Don
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

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