SAP Interview Question

Having a single LinkedList, and not knowing the head or tail. Delete a given node.

Interview Answer

Anonymous

Jun 9, 2015

This is a trick question! I.e. you can't. What you can do is replace all the internal variables of the next node into the given node, giving the appearance that the given node was deleted. This will of course not work for the last node