What's This? You cannot use nodes from original list!


#1

"You cannot use nodes from the original list.There seem to be extra nodes in the copied list you returned."
I have tested my code and there doesn’t seem to be any extra nodes in the output that my function gave. And what does it mean when it says we cannot use original nodes! Whats the deal?


#2

see for every node in original list you have to make a copy node with the value same as the original node value.But it is obvious that the addresses of the copy node and original node would be different. so the random pointer of copy node will not point to the node in original list. It should point to a node in copied list.