Q.
What’s wrong with this code which returns xor of two nodes address ?
//struct is common userdefined datatype in c/c++ and class is it's alternative
struct node* XOR (struct node *a, struct node *b)
{
return ((int) (a) ^ (int) (b)); //this logic is used to fill the nodes with address of a xor linked list
} Similar Questions
1.
In linked lists there are no NULL links in
2. Can we read a data item at any location of a list within a constant time (i.e.
O(1))?
3. node.next -> node.next.next; will make
4. A circular linked list can be used for
5. In doubly linked lists
6. The advantage of …………….. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists.
7. There is an extra element at the head of the list called a ……….
8. Each node in a linked list has two pairs of ………….. and ……………….
9. The disadvantage in using a circular linked list is …………………….
10. A linear list in which each node has pointers to point to the predecessor and successors nodes is called as
DATA STRUCTURE TOPICS