Sorry, left something out in my initial problem statement. It's a circular singly linked list.
Type: Posts; User: XSquared
Sorry, left something out in my initial problem statement. It's a circular singly linked list.
@Ping: The code just has to appear to remove the node from the list. As long as the list is without that node afterwards, and there aren't any memory leaks, it's all good. :p
Here's one from an interview I had:
Given a node in a singly linked list, with no other knowledge of the list (i.e. not knowing the head), how would you remove that node?