✅C++ Easy Solution ✅|| Easy Approach
Intuition\nAdding up the Sum btw two Zeros in the Linked List given and adding it into the new Linked List.\n\n\n# Complexity\n- Time complexity:\nO(N)  Since t
# Intuition\nAdding up the Sum btw two Zeros in the Linked List given and adding it into the new Linked List.\n\n\n# Complexity\n- Time complexity:\n**O(N)**  Since the Linked List is Traversed Once.\n\n- Space complexity:\n**O(1)**   Constant Space is used in the code.\n\n# Code\n```\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;\n *     ListNode() : val(0), next(nullptr) {}\n *     ListNode(int x) : val(x), next(nullptr) {}\n *     ListNode(int x, ListNode *next) : val(x), next(next) {}\n * };\n */\nclass Solution {\npublic:\n    ListNode* mergeNodes(ListNode* head) {\n        ListNode*ans=new ListNode(0);int temp=0;ListNode*curr=ans;\n        while(head!=NULL){\n            \n            if(head->val==0){\n                ListNode* temp1=new ListNode(temp);\n                curr->next=temp1;curr=curr->next;\n                temp=0;\n            }\n            else{temp+=head->val;}\n\n            head=head->next;\n        }\n        ans=ans->next->next;\n        return ans;\n    }\n};\n\n            /////////// Please Upvote ///////////\n```
['Linked List', 'C++']