YOU may join our Telegram for all subjects PDF BOOKS.
https://t.me/+Ccx9McEia7wyODg1
Data Structure Questions and Answers-Xor Linked List
Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
What is xor linked list?
uses of bitwise XOR operation to decrease storage requirements for doubly linked lists | |
uses of bitwise XOR operation to decrease storage requirements for linked lists | |
uses of bitwise operations to decrease storage requirements for doubly linked lists | |
just another form of linked list |
Question 1 Explanation:
Why we use bitwise XOR operation is to decrease storage requirements for doubly linked lists.
Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
What does a xor linked list have?
every node stores the XOR of addresses of previous and next nodes | |
actuall memory address of next node | |
every node stores the XOR of addresses of previous and next two nodes | |
every node stores xor 0 and the current node address |
Question 2 Explanation:
Every node stores the XOR of addresses.
Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
What does first and last nodes of a xor linked lists contain? (let address of first and last be A and B)
NULL xor A and B xor NULL | |
NULL and NULL | |
A and B | |
NULL xor A and B |
Question 3 Explanation:
NULL xor A and B xor NULL.
Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
Disadvantages of xor lists
Almost of debugging tools cannot follow the XOR chain, making debugging difficult | |
You need to remember the address of the previously accessed node in order to calculate the next node's address | |
In some contexts XOR of pointers is not defined | |
All of the mentioned |
Question 4 Explanation:
All the listed options are right.
Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
What are the important properties of xor lists
X⊕X = 0 | |
X⊕0 = X | |
(X⊕Y)⊕Z = X⊕(Y⊕Z) | |
All of the mentioned |
Question 5 Explanation:
The above are properties of xor lists.
There are 5 questions to complete.