a linked list is given, and a only pointer to a node is given which need to be deleted. it is singly linked list. you dnt have accees to any other pointer like head or what. you only have that node pointer in ur hand. thanks.
Swap the data with the next node and then delete that node. This trick is obviously incomplete and its suitability depends on the design of the list, but if you're working with unreasonable requirements, you often have no choice but to enforce unreasonable limitations on the solution. Read More
You say "a linked list is given", and a "pointer to a node which is to be deleted". Do you actually mean this; that you get the list in some way, AND the node to be deleted? If you have nothing but the node to be deleted, and it's the … Read More
Edited by Moschops
Edited by deceptikon
Edited by nitin1