Python | 99.50 beats | T-O(n)
\n\nclass Solution:\n    def mergeInBetween(self, list1: ListNode, a: int, b: int, list2: ListNode) -> ListNode:\n        head = list1\n        for _ in range(a
```\n\nclass Solution:\n    def mergeInBetween(self, list1: ListNode, a: int, b: int, list2: ListNode) -> ListNode:\n        head = list1\n        for _ in range(a-1):\n            head = head.next\n        cur = head.next\n        for _ in range(b-a):\n            cur = cur.next\n        head.next = list2\n        while head.next:\n            head = head.next\n        if cur.next:\n            head.next = cur.next\n        return list1\n```\nPlease upvote if you get it.
['Python']