XOR Linked List
The concept here is to reduce space used by doubly LL to save two address.
Now we will store XOR of Address so that only 1 space will be used.
How ?
Address will store XOR of Prev and next node so when we need to find address of next node just XOR stored address with prev node.
Now we will store XOR of Address so that only 1 space will be used.
How ?
Address will store XOR of Prev and next node so when we need to find address of next node just XOR stored address with prev node.
0 Comments:
Post a Comment