Python (Simple Maths)
\n    def mergeInBetween(self, list1, a, b, list2):\n        cur1, cur2, res1, res2 = list1, list2, [], []\n        \n        while cur1:\n            res1.appe
\n    def mergeInBetween(self, list1, a, b, list2):\n        cur1, cur2, res1, res2 = list1, list2, [], []\n        \n        while cur1:\n            res1.append(cur1.val)\n            cur1 = cur1.next\n            \n        while cur2:\n            res2.append(cur2.val)\n            cur2 = cur2.next\n                \n        res = res1[:a] + res2 + res1[b+1:]\n        \n        r1 = r2 = ListNode()\n        \n        for i in res:\n            r1.next = ListNode(i)\n            r1 = r1.next\n            \n        return r2.next
[]