Easy To Understand for Beginners Using Queue data Structure Very easy Approach🔥🔥🔥👍👍
Intuition\n Describe your first thoughts on how to solve this problem. \nTo Solve Question with simple approach by any data Structure\n\n# Approach\n Describe y
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nTo Solve Question with simple approach by any data Structure\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1.First we have add the element to queue and take variable "num" while we are adding the element , and inc the num  then simultaneously we check if num equals to "a" and in between "b" skip those elemnt from the listnode and add another all elemnt to queue.\n2.After that make num = 0 , make a new ListNode of name ans , traverse on queue and make inc to num ans check if num equals to "a" then add the elemnt of Listnode List2 to ans Listnode until it become null and after the remaning elemnt of queue will add to ans Listnode\n\n# Complexity\n- Time complexity: O(n^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\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 temp1 = list1;\n        ListNode temp2 = list2;\n        Queue<Integer> q1 = new LinkedList<>();\n        int num = 0;\n\n        while(temp1!=null)\n        {\n            while(num>=a && num<=b)\n            {\n                num++;\n                temp1=temp1.next;\n                continue;\n            }\n            q1.add(temp1.val);\n            temp1=temp1.next;\n            num++;\n        }\n        // System.out.print(q1);\n        num=0;\n        ListNode ans = new ListNode(-1);\n        ListNode temp3 = ans;\n\n        while(!q1.isEmpty())\n        {\n            if(num==a)\n            {\n                while(temp2!=null)\n                {\n                    temp3.next=temp2;\n                    temp3=temp2;\n                    temp2=temp2.next;\n                }\n            }\n            ListNode z = new ListNode(q1.poll());\n            temp3.next=z;\n            temp3=z;\n            num++;\n        }\n\n        return ans.next;\n    }\n}\n```
['Java']