Monday, November 23, 2015

Delete Node if you have access only to that node

The Linked List program is available here: link
    public void deleteNode(LinkedList Node)    {
        if(Node!=null && Node.next!=null)    {
            Node.data=Node.next.data;
            Node.next=Node.next.next;
        }
    }

No comments:

Post a Comment

UA-39217154-2