2 ms·
Nice puzzle! I think you can allow both kinds of deletions while still using four pointers per link node: * prev1 XOR next1 * prev2 XOR next2 * prev1 XOR pre
by cousin_it 10y ago
Nice puzzle! I think you can allow both kinds of deletions while still using four pointers per link node:
* prev1 XOR next1
* prev2 XOR next2
* prev1 XOR prev2
* data1 XOR data2
Because while traversing you always know one of {prev1, prev2} and one of {data1, data2}. Right?