Hi All
I saw this question posted on a site asked in a technical interview
Node has a data pointer as well as point to some data.
Can somebody help me understanding what this question mean in detail??
Does this mean that Node has pointer to another node and point to some other data node as well. And that data node does not point to any other node.
In that case our node will have two pointers.
i am really confused. Please Help.
Thanks in advance
It should ideally read: Node has a “Next” pointer and the node-data itself is a pointer. Such kind of data structures are common where data itself can be huge and cannot be kept in-memory or within the same node.
Edit:
Looking at the question link: my assumption, mentioned above, seems to be what it is. All you need to do is pick up the pointer from the data field of the node and delete that before deleting the node.