19,395 views

5 Answers

Best answer
11 votes
11 votes
When question comes like this we should think as a question asking person. I suppose this was meant in an easy way, where we have one data node and two pointers and hence we get 3 fields.

With XOR linked list, we can use just one pointer instead of 2 and similarly strictly speaking we do not need a data node also. So, we can get even 1 here. But lets be simple and mark answer as 3.
selected by
2 votes
2 votes

By quoting from Wiki "An XOR linked list is a data structure used in computer programming. It takes advantage of the bitwise XOR operation to decrease storage requirements for doubly linked lists."

Read it here: https://en.wikipedia.org/wiki/XOR_linked_list

You just need to have one field for storing the address. Another field for storing the data. I think the answer should be 2. 

Though I have read about the XOR linked lists during the interview preparations, I have not implemented it.

0 votes
0 votes
i think answer will be 2. it should have 2 compulsary field . the previous node pointer and the pointer to next field. data may or may not be present.
Answer:

Related questions

5 votes
5 votes
3 answers
1
go_editor asked Jun 13, 2016
14,582 views
Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?Deleting a node whose location is givenSearching an unsor...
2 votes
2 votes
1 answer
2
go_editor asked Jun 13, 2016
17,859 views
The time required to search an element in a linked list of length n is$O(\log_2 n)$$O(n)$$O(1)$$O(n^2)$
4 votes
4 votes
1 answer
3
go_editor asked Jun 13, 2016
3,226 views
A complete binary tree with the property that the value at each node is at least as large as the values at its children is known asbinary search treeAVL treecompletely ba...
9 votes
9 votes
1 answer
4