Easy Java Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\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 first=head.next;\n        ListNode sec=head;\n        ListNode temp=new ListNode();\n        ListNode newh=temp;\n\n        while(first!=null)\n        {\n            while(first!=null && first.val!=0)\n            first=first.next;\n          int sum=0;\n            while(sec!=first)\n            {\n                sum+=sec.val;\n                sec=sec.next;\n            }\n            first=first.next;\n           temp.next=new ListNode(sum);\n           temp=temp.next;\n        \n        }\n\n        return newh.next;\n        \n    }\n}\n```
['Linked List', 'Two Pointers', 'Java']