Open In App
Related Articles

Data Structures | Linked List | Question 14

Improve Article
Improve
Save Article
Save
Like Article
Like

Is it possible to create a doubly linked list using only one pointer with every node.

(A)

Not Possible

(B)

Yes, possible by storing XOR of addresses of previous and next nodes.

(C)

Yes, possible by storing XOR of current node and next node

(D)

Yes, possible by storing XOR of current node and previous node


Answer: (B)

Explanation:

Yes, it is possible to implement a doubly linked list using a single pointer per node, by storing the XOR of the addresses of the previous and next nodes.


Quiz of this Question
Please comment below if you find anything wrong in the above post

Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads
Related Tutorials