Easy solution with c++
Follow the code along to understand the concept :\n\n\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;
Follow the code along to understand the concept :\n\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* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        int i = 0;\n        ListNode *temp1 = list1;\n        //running a loop to find the previous node from where it will join the list with list2\n        while(i<a-1){\n            temp1 = temp1->next;\n            i++;\n        }\n        \n        ListNode *temp2 = temp1->next;\n        temp1->next = list2;\n        //this loop is for the next node where we have to join the tail of list2\n        while(i<b){\n            temp1 = temp2;\n            temp2 = temp2->next;\n            delete(temp1);//free the nodes to be removed\n            i++;\n        }\n        //iterating through list2 to find the tail and joining it with the list1\n        while(list2->next!=NULL){\n            list2 = list2->next;\n        }\n        list2->next = temp2;\n        \n        return list1;\n    }\n};\n```
['Linked List', 'C']