Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution
- {
- public:
- //Function to delete a node without any reference to head pointer.
- void deleteNode(Node *del)
- {
- // Your code here
- del->data = del->next->data;
- del->next = del->next->next;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment