Merge In Between Linked Lists | Easy Straight Forward | AMAZON | Leetcode 1669 | codestorywithMIK

  Рет қаралды 3,861

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 35
@durgeshkushwaha2534
@durgeshkushwaha2534 8 ай бұрын
Excellent explanation ❤️. I wrote the code in just one go without seeing the actual code.
@anshror2583
@anshror2583 8 ай бұрын
brother is some teacher and have great explaination skills wow
@nawazthezaifre8870
@nawazthezaifre8870 8 ай бұрын
I was able to think the approach but the confusing point for me that how can I shift one pointer to a and another pointer to the bth location. But after seeing your video everything is cleared. Thanks for helping out.
@anuppatankar4294
@anuppatankar4294 8 ай бұрын
Great video 👌🏻
@utkarshsahay9908
@utkarshsahay9908 8 ай бұрын
class Solution { public: ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) { ListNode* l1start = list1; ListNode* l2start = list2; int len = 0; while(len < a-1){ l1start = l1start->next; len++; } ListNode* l2end = list2; while(l2end != NULL && l2end->next != NULL){ l2end = l2end->next; } ListNode* removestart = l1start->next; for(int i = a;inext; } l1start->next = l2start; l2end->next = removestart->next; removestart->next = NULL; return list1; } };❤❤
@gauravbanerjee2898
@gauravbanerjee2898 8 ай бұрын
Thanks a lot bhaiya ❤❤
@krantisambhav1471
@krantisambhav1471 8 ай бұрын
Bhai tum hero ho
@sauravchandra10
@sauravchandra10 8 ай бұрын
Bhaiya GFG POTD ke hard questions ki video banado. They are genuinely good questions, and are frequently asked in OAs
@anuppatankar4294
@anuppatankar4294 8 ай бұрын
+1
@codestorywithMIK
@codestorywithMIK 8 ай бұрын
Hi guys, I will try but actually i get very less time because of my other work schedules. Will try soon to cover GFG too
@chakrabarti9634
@chakrabarti9634 8 ай бұрын
@@codestorywithMIK Sir apke channel ka name suna hai lekin as a beginner pata nhi hai kaise is channel ko follow karu thoda sa bata dijiye konse sequence mai playlist ya videos dekhe please.dhonoyobad❤
@codestorywithMIK
@codestorywithMIK 8 ай бұрын
If you are a beginner, You can start with Arrays first. Then go with stacks, LinkedList, Strings, Recursion, Backtracking , DP, Tree, Trie, Graph Go from easy to tough topics. And watch this on how to cover each topic - kzbin.info/www/bejne/aHvWmZmlnJZ4isksi=7LlNFweK43xiROwP
@darkstudio3170
@darkstudio3170 8 ай бұрын
Number of Ways to Wear Different Hats to Each Other. Leetcode 1434 . Please create a video on this .Thanks
@tutuimam3381
@tutuimam3381 8 ай бұрын
Thanks ❤❤❤❤❤❤
@pushpendrasingh3470
@pushpendrasingh3470 8 ай бұрын
Bhaiya leetcode ke contest aur leetcode enough hai ya codeforces bhi krna padega online assesment ke liye??
@sauravchandra10
@sauravchandra10 8 ай бұрын
Python code: class Solution: def mergeInBetween(self, list1: ListNode, a: int, b: int, list2: ListNode) -> ListNode: cur = list1 prev = None for i in range(b+1): if i == a - 1: prev = cur cur = cur.next prev.next = list2 while list2.next: list2 = list2.next list2.next = cur return list1
@udaysingh2929
@udaysingh2929 8 ай бұрын
just solved this question😃😃
@vivek3247
@vivek3247 8 ай бұрын
sir STL concepts playlist start plz
@DevOpskagyaan
@DevOpskagyaan 8 ай бұрын
Done 👍🏻
@chakrabarti9634
@chakrabarti9634 8 ай бұрын
Sir apke channel ka name suna hai lekin as a beginner pata nhi hai kaise is channel ko follow karu thoda sa bata dijiye konse playlist se kare kaise please please.dhonoyobad❤
@Ankitkumar-fz3kc
@Ankitkumar-fz3kc 8 ай бұрын
Sir publishe LC potd video daily also you can watch playlist for any particular topic.
@techyou6163
@techyou6163 8 ай бұрын
Kal ka potd ka dusra approach bhi upload kardo na waiting.....
@shraban8508
@shraban8508 8 ай бұрын
sir greedy approach ka video upload kardo task scheduler problem ka
@8daudio672
@8daudio672 8 ай бұрын
bhaiya aaj ka GFG PoTD please
@oqant0424
@oqant0424 8 ай бұрын
i just wrote a beautiful story for the question and guess what ?? I did the question on my own🤯 Thanks MIK ❤ for your story -> code method Came here to learn something POTD DONE [20.3.24]✅✅
@oqant0424
@oqant0424 8 ай бұрын
class Solution { public: ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2) { /* story:- -> find a ✅ ->find prev of a✅ ->find b✅ ->find tail of 2nd list (tail2) ✅ -> prev->next=head2✅ ->tail2->next=b->next✅ ->b->next=NULL✅ ->return head1;✅ */ // step 1,2,3 of story ListNode* tempA=list1; //a ListNode* prev=list1; //prev ListNode* tempB=list1; //b while(a--){ prev=tempA; tempA=tempA->next; } while(b--){ tempB=tempB->next; } // 4th point of story ListNode* tail2=list2; while(tail2->next){ tail2=tail2->next; } // step 5,6,7,8 of story prev->next=list2; tail2->next=tempB->next; tempB->next=NULL; return list1; } };
@dhairyachauhan6622
@dhairyachauhan6622 8 ай бұрын
Hi bhaiya, My internship starts from 10am-7pm. I am only able to solve 2-3 questions a day coz of it.Any solution?
@harshtiwari416
@harshtiwari416 8 ай бұрын
Bhai internship ka thoda baaato kaise apply kana hai, resume
@dhairyachauhan6622
@dhairyachauhan6622 8 ай бұрын
@@harshtiwari416 Make sure to build projects along with DSA. Company Now look at your projects too. My 50% interview was DSA and the rest 50% was about projects and git. I cracked 2 companies coz of it which no one did in my college.
@Sahilsharma-sk5vr
@Sahilsharma-sk5vr 8 ай бұрын
how many projects ( full stack) should be in the resume for placements. Share some insight your experience
@harshtiwari416
@harshtiwari416 8 ай бұрын
Resume share krdo drive pe
@dhairyachauhan6622
@dhairyachauhan6622 8 ай бұрын
Atleast 2-3 good projects
@ankanbrahmachary6581
@ankanbrahmachary6581 8 ай бұрын
really should have been a easy
@kumarashutosh-p3n
@kumarashutosh-p3n 5 ай бұрын
int count=0; ListNode* s1=list1; ListNode* e1=list1; ListNode* s2=list2; ListNode* e2=list2; ListNode* temp=NULL; while(s1&&count!=a-1){ s1=s1->next; count++; } count=0; while(e1&&count!=b+1){ temp=e1; e1=e1->next; count++; } while(e2&&e2->next){ e2=e2->next; } s1->next=NULL; temp->next=NULL; s1->next=s2; e2->next=e1; return list1;
@singhshek58
@singhshek58 8 ай бұрын
1st comment
Palindrome Linked List | 4 Approaches | Leetcode 234| codestorywithMIK
44:53
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 36 МЛН
Graph Part 2
28:51
ZeCode Community
Рет қаралды 205
Merge in Between Linked Lists - Leetcode 1669 - Python
6:22
NeetCodeIO
Рет қаралды 9 М.
C Programming Tutorial for Beginners
3:46:13
freeCodeCamp.org
Рет қаралды 14 МЛН
AWS Certified Cloud Practitioner Training 2020 - Full Course
3:58:01
freeCodeCamp.org
Рет қаралды 7 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН