In your example, I noticed that all values are positive number and
none of them are not out of array bounds. Which means that was really
special case, not applicable for general cases.

> Pos   Val
> 1       4
> 2       1
> 3       1
> 4       2
> 5       9
> 6       8
> 7       5
> 8       7
> 9       6
> 10      3
> -------------
> 1 -> 4 -> 2 -> 1
> 2 -> 1 -> 4 -> 2
> 3 -> 1 -> 4 -> 2 -> 1
> 4 -> 2 -> 1 -> 4
> 5 -> 9 -> 6 -> 8 -> 7 -> 5
> 6 -> 8 -> 7 -> 5 -> 9 -> 6
> 7 -> 5 -> 9 -> 6 -> 8 -> 7
> 8 -> 7 -> 5 -> 9 -> 6 -> 8
> 9 -> 6 -> 8 -> 7 -> 5 -> 9
> 10 -> 3 -> 1 -> 4 -> 2 -> 1
>
> On Aug 16, 1:41 pm, dsha <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi there,
>
> > I'm interested in the following problem: there is an array of integers
> > that contains each element only once except for one element that
> > occurs exactly twice. Is there a way to find this element faster than
> > O(n*log n) and with constant extra memory? If no, how can I prove it?
>
> > Thanks in advance for ideas.- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to