[C++] Linked-list to Vector || Easy-Understanding
\nclass Solution {\npublic:\n    ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        vector<int> nums1, nums2, res;\n        Lis
```\nclass Solution {\npublic:\n    ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        vector<int> nums1, nums2, res;\n        ListNode* temp1 = list1, *temp2 = list2;\n        while(temp1 != NULL)\n            nums1.push_back(temp1->val), temp1 = temp1->next;\n        \n        while(temp2 != NULL)\n            nums2.push_back(temp2->val), temp2 = temp2->next;\n        \n        \n        for(int i = 0; i < a; i++)\n            res.push_back(nums1[i]);\n        for(int i = 0; i < nums2.size(); i++)\n            res.push_back(nums2[i]);\n        for(int i = b+1; i < nums1.size(); i++)\n            res.push_back(nums1[i]);\n        \n        ListNode* head = new ListNode(0), *curr = head;\n        int i = 0;\n        while(i < res.size()){\n            curr->next = new ListNode(res[i++]);\n            curr = curr->next;\n        }\n        \n        return head->next;\n        \n    }\n};\n```
['Linked List', 'C', 'C++']