yes, that was an implementation mistake but what I meant to say was- Adding
extra check of indirect xor'ing could have a pitfall too.
Try the case: [0 1 1 1 4 4]
http://ideone.com/3sreLZ


On 4 November 2012 10:13, Vikram Pradhan <vpradha...@gmail.com> wrote:

>  It should have caught in the first loop where i checked that condition if
> the first value (which is 3 in this case) is repeated or not ...but
> unfortunately i  implemented that wrong ...so now i've corrected that
> mistake ..i hope now it'll work fine ..
> http://ideone.com/MQ44Rt
>
> the whole idea of using xor is that we don't have to modify the array as
> i've seen this same question somewhere else where the condition was that
> the array is a read only array ..otherwise Don's method will work fine .
>
>
>
>
>
>
>
> Vikram Pradhan | B.Tech| Computer Science & Engineering | NIT Jalandhar
>>  | 9740186063 |
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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