C++ solution
```\nclass Solution {\npublic:\n    ListNode mergeInBetween(ListNode list1, int a, int b, ListNode list2) {\n        \n        ListNode start;\n        ListNode
```\nclass Solution {\npublic:\n    ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        \n        ListNode* start;\n        ListNode* last;\n        ListNode* curr = list1;\n        \n        int count = 1;\n        \n        while(curr){\n            \n            if(count == a) start = curr;\n            if(count == b) last = curr->next->next;\n            curr = curr->next;\n            count++;\n        }\n        \n        start->next = list2;\n        curr = list2;\n        while(curr->next){\n            curr= curr->next;\n        }\n        curr->next = last;\n        \n        return list1;\n    }\n};
[]