Given a pointer to an element in a singly linked-list, how can you delete the element from the list?
Sigiloso
the tricky part in thw questions is that you dont have any pointer to the root of the list. You only have access to the element you want to remove. So you have to copy the data from the next node, element.data=element.next.data and then element.next=element.next.next in doing this you "removed" the element from the list. I hope this is clear