✅✅ Beginner's Friendly || Easy Approach || JAVA || 3ms || 🔥🔥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * Definition for singly-linked list.\n * public class ListNode {\n *     int val;\n *     ListNode next;\n *     ListNode() {}\n *     ListNode(int val) { this.val = val; }\n *     ListNode(int val, ListNode next) { this.val = val; this.next = next; }\n * }\n */\nclass Solution {\n    public ListNode mergeInBetween(ListNode list1, int a, int b, ListNode list2) {\n        ListNode ans=new ListNode(-1);\n        ListNode temp=ans;\n        int index=0;\n        while(list1!=null){\n            if(index==a){\n                while(list2!=null){\n                    temp.next=list2;\n                    list2=list2.next;\n                    temp=temp.next;\n                }\n            }\n            if(index<a || index>b){\n                temp.next=list1;\n                temp=temp.next;\n                }\n            list1=list1.next;\n            index++;\n        }\n        return ans.next;\n        \n    }\n}\n```
['Linked List', 'Java']