Basic C++ approach (Clean and Simple with explanation)
The basic approach is as follows :-\n\n1. Traverse the linked list to the given elements a and b\n1. Set the next of a to the head of the other given linked lis
The basic approach is as follows :-\n\n1. Traverse the linked list to the given elements a and b\n1. Set the next of a to the head of the other given linked list\n1. Set the next of the tail of the other given linked list to the pointer to b\n1. Return the original linked list as the final answer\n\n```\nclass Solution {\npublic:\n    ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) {\n        \n        int jump1 = 1;\n        ListNode *temp1 = list1;\n        while (jump1 < a){\n            temp1 = temp1->next;\n            jump1++;\n        }                                //Gets the pointer to a\n        \n\t\tint jump2 = 1;\n        ListNode *temp2 = list1;\n        while(jump2 <= b){\n            temp2 = temp2->next;\n            jump2++;\n        }                                //Gets the pointer to b\n        \n\t\tListNode *temp3=list2;\n        while(temp3->next != NULL){\n            temp3=temp3->next;\n        }                               //Gets the pointer to the tail of list2\n        \n\t\t\n\t\ttemp1->next=list2;              //set the next pointer of a to the head of list2\n        \n\t\ttemp3->next = temp2->next;      //set next of tail of list2 to the pointer to b\n        \n\t\treturn list1;                   //return the original list i.e. list1\n        \n    }\n};\n```\n\nAuthor: shubham1592\n[https://github.com/shubham1592/LeetCode/blob/main/1669_Merge_In_Between_Linked_Lists.cpp](https://github.com/shubham1592/LeetCode/blob/main/1669_Merge_In_Between_Linked_Lists.cpp)
['C']