XOR-trick and PUZZLE (was comma-operator)

Miles Bader bader+ at andrew.cmu.edu
Mon Jan 25 08:03:42 AEST 1988

> How can you use the XOR trick to keep a doubly linked list, using only
> one field for in each record, to code for finding both the following and 
> the previous record?  

To make it a bit clearer, you have to be able to find the NEXT record
given the current and previous records, and find the PREVIOUS record
given the current and the next record.

More information about the Comp.lang.c mailing list