[JAVA] EASY SOLUTION
\n/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNode() {}\n *     ListNode(int val)
```\n/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNode() {}\n *     ListNode(int val) { this.val = val; }\n *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }\n * }\n */\nclass Solution {\n    public ListNode mergeNodes(ListNode head) {\n        ListNode newList=new ListNode(0);\n        ListNode newHead=newList;\n       ListNode newtemp= newList;\n/*---------------------------------------------------------------*/\n        ListNode temp=head.next;\n        int sum=0;\n        if(head==null && head.next==null) return head;\n/*---------------------------------------------------------------*/  \n        while(temp!=null){  //traverse linkelist\n            sum +=temp.val;  //sum elements until zero\n            if(temp.val==0){\n               ListNode node=new ListNode(sum); //create a new node; \n               newtemp.next=node; //connect with dummy node which is created initially\n                newtemp=newtemp.next; //shift pointer to newly created node\n                sum=0; //reset sum\n            }\n            temp=temp.next;\n        }\n/*---------------------------------------------------------------*/\n        return newHead.next; //skip dummy node which is created initially\n    }\n}\n```\n**Please UPVOTE if you understand my code and comment your best approach**
['Linked List', 'Java']