Thursday, May 5, 2011

Beauty of xor-lists

XOR-lists are beautiful because your can store a double chained list by using a single pointer for cell. For instance   in the list A, B, C, D, E  you store A (B), B (B xor C), C (C xor D), D ( D xor E), E . So coming from B you can perform a B xor (B xor C) obtaining C and viceversa coming from D, you  have C = ( C xor D) xor D. In modern computers you have enough ram for not paying attention to those xor-lists, but they are still useful in many circumstances.

Do you know when?

No comments:

Post a Comment