NVIDIA Interview Question

Given a function that accepts a node of a singly linked list as a parameter, how would you delete that node from the complete linked list using this function without any other information?

Interview Answer

Anonymous

Jul 3, 2014

Copy the next node's information into the current node and then delete the next node. You technically never "delete" the given node, you just overwrite it with the next node's information and delete the next node.

6