An XOR linked list compresses the same information into *one* address field
by storing the bitwise XOR of the address for *previous* and the address
for *next* in one field:

 ...  A        B         C         D         E  ...
         <–>  A⊕C  <->  B⊕D  <->  C⊕E  <->

When you traverse the list from left to right: supposing you are at C, you
can take the address of the previous item, B, and XOR it with the value in
the link field (B⊕D). You will then have the address for D and you can
continue traversing the list. The same pattern applies in the other
direction.



Question: since the address of B is not stored explicitly in C, the
statement "you can take address of previous item B and xor it in the link
field" is not clear. i understand that there are no previous or next links
after having the XOR values per node. Afterall the objective is to reduce
storage here..





Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652


On Sun, Aug 8, 2010 at 12:19 PM, Pramod Negi <[email protected]> wrote:

> Search XoR List on Wiki
>
>
> On Sun, Aug 8, 2010 at 10:19 AM, UMESH KUMAR <[email protected]>wrote:
>
>> how to convert Doubly Link list to a Singly link list without changes
>> the Structure of the list if possible or not ,if possible then try to
>> discus of that problem.....................
>>
>>
>> thanks and Regards
>> Umesh kumar
>>
>>  --
>> 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]<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