✅☑ [C || Python3] || 100% Working 🔥🔥 || Easy Method Solution || Please Upvote If Find useful 🔥||
Code\n\npython3 []\n# Definition for singly-linked list.\n# class ListNode:\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         se
# Code\n\n```python3 []\n# Definition for singly-linked list.\n# class ListNode:\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         self.next = next\nclass Solution:\n    def mergeInBetween(self, list1: ListNode, a: int, b: int, list2: ListNode) -> ListNode:\n        itr = list1\n        count = 0\n        while itr:\n            if count == a-1:\n                ptr = itr\n            if count == b+1:\n                qtr = itr\n            count += 1\n            itr = itr.next\n        itr2 = list2\n        while itr2.next:\n            itr2 = itr2.next\n        ptr.next = list2\n        itr2.next = qtr\n        return list1\n```\n```C []\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     struct ListNode *next;\n * };\n */\n\n\nstruct ListNode* mergeInBetween(struct ListNode* list1, int a, int b, struct ListNode* list2){\n    struct ListNode *itr = list1;\n    struct ListNode *ptr;\n    struct ListNode *qtr;\n    int count = 0;\n    while (itr != NULL){\n        if (count == a - 1){\n            ptr = itr;\n        }\n        if (count == b + 1){\n            qtr = itr;\n        }\n        count++;\n        itr = itr->next;\n        }\n        struct ListNode *itr2 = list2;\n        while (itr2->next != NULL){\n            itr2 = itr2->next;\n        }\n        ptr->next = list2;\n        itr2->next = qtr;\n        return list1;\n}\n```\n\n
['Linked List', 'C', 'Python3']