Open In App
Related Articles

ISRO | ISRO CS 2008 | Question 74

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
The minimum number of fields with each node of doubly linked list is (A) 1 (B) 2 (C) 3 (D) 4

Answer: (C)

Explanation: In general, each node of doubly link list always has 3 fields, i.e., the previous node pointer, the data field, and the next node pointer, see – doubly linked list introduction So, answer should be option (C) 3. However, each node of doubly linked list can have only 2 fields, i.e., XOR pointer field, and data field. This XOR pointer field can points both previous node and next node, this is the best case with data field. This is called as memory efficient doubly linked list, see – XOR linked list – a memory efficient doubly linked list | set 1 Also, if we remove data node from the XOR linked list, then each node of this doubly linked list can have only 1 field, i.e., XOR pointer field. But, this is without data field so, this doubly linked list does not make sense.

Quiz of this Question

Last Updated : 07 Sep, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads