• + 0 comments
    public static  Node insert(Node head,int data) {
            //Complete this method
            
            Node current = head;
            if (head == null)
                head = new Node(data);
            else{
                while(current.next != null){
                    current = current.next;
                }
                    current.next = new Node(data);
            }
            return head;
        }