java, easy O(n)
\n    public ListNode mergeNodes(ListNode head) {\n        ListNode curr, root = new ListNode();\n\t\tcurr = root;\n        int sum = 0;\n        while(head!=nu
\n    public ListNode mergeNodes(ListNode head) {\n        ListNode curr, root = new ListNode();\n\t\tcurr = root;\n        int sum = 0;\n        while(head!=null){\n            if(head.val==0 && sum!=0){\n                curr.next = new ListNode(sum);\n                curr = curr.next;\n                sum = 0;\n            }\n            sum+=head.val;\n            head = head.next;\n        }\n        return root.next;\n    }
['Java']