Easiest Solution || Linked List || C++
Code\nc++\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;\n *     ListNode() : val(0), next(nullptr) 
# Code\n```c++\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* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        \n        ListNode* prev=list1;\n        ListNode* curr1=list1;\n        ListNode* temp=list2;\n        int i=1;\n        while(i!=a){\n            prev=prev->next;\n            i++;\n        }\n        curr1 = prev->next;\n        while (i <= b) {\n            curr1 = curr1->next;\n            i++;\n        }\n        while(temp->next!=NULL){\n            temp=temp->next;\n        }\n        prev->next=list2;\n        temp->next=curr1;\n        curr1=NULL;\n\n        return list1;\n    }\n};\n```
['C++']