How do you calculate the pointer difference in a memory efficient double linked list?

Q & ACategory: Data StructureHow do you calculate the pointer difference in a memory efficient double linked list?
Admin Staff asked 4 years ago

How do you calculate the pointer difference in a memory efficient double linked list?
a) head xor tail
b) pointer to previous node xor pointer to next node
c) pointer to previous node – pointer to next node
d) pointer to next node – pointer to previous node

1 Answers
Admin Staff answered 4 years ago

b) pointer to previous node xor pointer to next node