delete a node in singly linked list whose head is not known

Given a singly linked list whose head is not known ,you have to delete a given node.

Comments

  1. copy the contents of the next node to the given node and simply delete the next node.

    ReplyDelete
  2. @sandeep what if the node that you want to delete is last node or if it is the only node....

    ReplyDelete

Post a Comment

Popular posts from this blog