FactSet Interview Question

How would you remove a node from a list with only a pointer to the node itself?

Interview Answer

Anonymous

Nov 12, 2012

Copy the value of the next node in this node and have it point to next->next, in effect deleting the "next" node instead.

2