In Data Structures and Algorithms Made Easy, struct
of memory efficient memory list given as follows,
struct LinkNode
{
int data;
struct LinkNode* ptrdiff;
}
In ptrdiff
, there will be xoring of previous and next node is done. For example, previous node have address 100 and next node address is 500.
So, in ptrdiff address will be 400. Now how it is possible to move to next or previous node (as we do in doubly link list), just by knowing xoring of their addresses?
Am I missing any step here?