Find Intersection point of 2 Linked List | Lecture 22.8

  Рет қаралды 123,407

Apna College

Apna College

Күн бұрын

Complete C++ Placement Course (Data Structures+Algorithm) : • C++ Full Course | C++...
Telegram: t.me/apnikaksh...
Instagram: / dhattarwalaman
Notes of this Lecture:

Пікірлер: 250
@shaileshyadav6004
@shaileshyadav6004 3 жыл бұрын
mam apke padhane ke tarike se apka fan ho gaya hu best tarika hai apka koi chij samajhane ka
@akshayan4012
@akshayan4012 2 жыл бұрын
In the while loop of traversing the extra length, we need not check whether the pointer reaches NULL because we are traversing the extra length right, so that will never reach NULL within that loop
@Aman-fz1ew
@Aman-fz1ew Жыл бұрын
yes thats correct
@yashgaikwad5559
@yashgaikwad5559 Жыл бұрын
what if second list given is null?
@pranavJha93
@pranavJha93 8 ай бұрын
@@yashgaikwad5559 u can check the edge cases before writing the logic
@codewithmePuneet
@codewithmePuneet 4 ай бұрын
@@pranavJha93 that's why you check if it is null or not. Because, logical error is still ok but null-pointer-access is fatal
@abhaygupta73
@abhaygupta73 4 жыл бұрын
Best ever video I watched on placement series is course ne mjhe nayi ummed di h ki m bhi Google me placement le sakta hu AGR m mehnat kru
@chotuagrawal3236
@chotuagrawal3236 4 жыл бұрын
Bhaiya with respect 🙏, Sirf bdi bdi batein krne s kuch ni hota apne promise kra apne 25 lakh subscribers k samne ki yeh course pura hoga and within time hoga but ab yeh course itna late hogya h and videos bhi ni dal rhi h or shyd yeh complete bhi na ho . Ap politics ki practice mt kro jo sirf jhoote vade krke bad m kuch ni krte Agr apse itna ni hora h then 25 lakh logo k samne itne commitment krne ki jrurat ni thi 🙏🙏. Srry agr jyada likha ho but asman k sapne dikha atleast zameen level ka toh or within time content toh do 🙏
@sushilchaurasia
@sushilchaurasia 4 жыл бұрын
Great ❤️❤️❤️❤️❤️ Di and bhaiya
@suhailahmad3340
@suhailahmad3340 4 жыл бұрын
Mai dusri channel say web deve.. Seekh raha tha but aap ki video dekii just demo tow, us course aur channel ko beech ma chood k aya for this amazing series ....always pray for u to reach the sky of ur dreams .....love u aman baiya and all the team members love u guys ...
@AnshulCSE
@AnshulCSE 4 жыл бұрын
Wonderful way of explaining ❤️
@niladriroy1665
@niladriroy1665 4 жыл бұрын
Abe 1 min mai samaj gya 😂😂 video to 9 min ka hai
@AnshulCSE
@AnshulCSE 4 жыл бұрын
I'm folow this course from 1 video. So please use some common sense before passing comment..
@AnshulCSE
@AnshulCSE 4 жыл бұрын
@@niladriroy1665 🙏🙏
@Jonathan-ng4vw
@Jonathan-ng4vw 2 жыл бұрын
@@AnshulCSE *common please check your spelling
@mrsmurf911
@mrsmurf911 2 жыл бұрын
@@Jonathan-ng4vw p1=head1; p2=head2;
@KrishnaGupta-xd6xu
@KrishnaGupta-xd6xu 4 жыл бұрын
Bhaiya please complete this course soon its already being very late , Lots of students waiting for this 🙏🙏🙏
@prakhar16
@prakhar16 2 жыл бұрын
In second approach @3:15 we are calculating length of both LL by traversing both LL full length m and n so time complexity should not be O(m+n) ?
@codewithmePuneet
@codewithmePuneet 4 ай бұрын
it is O(m+n)
@PrakashKumar-vr9wc
@PrakashKumar-vr9wc 4 жыл бұрын
Thanks sis. It's very helpful for me
@gauravkumar-ct5dh
@gauravkumar-ct5dh 4 жыл бұрын
Hello Bhaiya!!! Eagerly waiting for rest of the course. You all did a great job but please don't delay the course.
@tanyagupta4247
@tanyagupta4247 3 жыл бұрын
Thankyou loved the approach!
@prashantchakrawarti42
@prashantchakrawarti42 4 жыл бұрын
Thanku DIDI 🙏🙏
@dikshantgangwal9417
@dikshantgangwal9417 4 жыл бұрын
Thanks a lot 😇
@pinkeshpatel1940
@pinkeshpatel1940 3 жыл бұрын
Wonderfully explained. Thanks for great content. :)
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky aapko
@ayushsrivastava2397
@ayushsrivastava2397 3 жыл бұрын
too good explaination.....cleared every thing
@broskie_ceo1825
@broskie_ceo1825 4 жыл бұрын
You should also start a series on CYBER SECURITY, in future this industry will boom due to the technological advancement that is happening in today's world. Like what should you focus on during your starting phase and etc. Hope you read this comment and release a series on CYBER SECURITY!!!!
@arnavraj9094
@arnavraj9094 4 жыл бұрын
You mean ethical hacking?
@09ankitverma89
@09ankitverma89 4 жыл бұрын
bro y vala course aur web D toh poora ho jaye na
@broskie_ceo1825
@broskie_ceo1825 4 жыл бұрын
@@arnavraj9094 that’s one side of it but there are other fields in this major like pen testing, offensive hacking, red team, defensive hacking, bug bounty and etc.
@akashthoriya
@akashthoriya 4 жыл бұрын
Please cover the most popular Leetcode challenges ko bhi include kar do bhai. [Difficulty = Hard vale]
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky apko
@akashthoriya
@akashthoriya 2 жыл бұрын
@@dipakdhakate5613 yes lag gai hai
@kale-lb5pr
@kale-lb5pr Жыл бұрын
node* intersectionY(node* head1, node* head2) { if (head1 == NULL || head2 == NULL) return NULL; node* temp = head1; map mpp; // Insert nodes of the first linked list into the map while (temp != NULL) { mpp[temp]=1; temp = temp->next; } // Traverse the second linked list and check for intersection temp = head2; while (temp != NULL) { if (mpp.find(temp) != mpp.end()) { return temp; } cout
@Syntax-scribe-jsx
@Syntax-scribe-jsx 4 ай бұрын
thankyou mam!
@SatyamGupta-yq1pt
@SatyamGupta-yq1pt 4 жыл бұрын
Mam apka ds bahut strong
@AmarjeetKumar-to9ub
@AmarjeetKumar-to9ub 2 жыл бұрын
Thank you :)
@Learningdam
@Learningdam 3 жыл бұрын
Very clear explanation 👍
@sahilsawal664
@sahilsawal664 4 жыл бұрын
Nicely Explanation Ma'am :) 🔥👍👌✌
@adityaagarwal2324
@adityaagarwal2324 3 жыл бұрын
Why we have called head1 and head2 by reference, in the Q can I called without it??
@SatendraKumar-mk1ui
@SatendraKumar-mk1ui 4 жыл бұрын
Please increase the frequency of the video.
@krishnananddubey2870
@krishnananddubey2870 3 жыл бұрын
There is no need to add if condition in while(d) { ___} part as ptr1 will never become NULL on doing d-- as ptr1 is always greater than ptr2.
@gauravupreti9340
@gauravupreti9340 3 жыл бұрын
No, if second linked list is NULL, then this condition is needed.
@ShivamSingh-tk5gu
@ShivamSingh-tk5gu 3 жыл бұрын
Yes ,this is a unnecessary condition because if second LL will null then first will completely traverse and then return -1 takes place
@gauravupreti9340
@gauravupreti9340 3 жыл бұрын
@@ShivamSingh-tk5gu Yes, you are right, there will be no segmentation fault in this case.
@charannn3755
@charannn3755 4 жыл бұрын
when this course will be completed? my placements are starting from next sem(in 2-3 months) Aman bhaiya respond please..!
@namanjain7710
@namanjain7710 4 жыл бұрын
They won't respond what they said in the timeline video that till 6 Jan graphs will be completed but now not even linked list is complete
@saurabhkumar5941
@saurabhkumar5941 4 жыл бұрын
bhai.. aur bhi channels hain wahan se dekle.. koi koi topics
@shauncrasta
@shauncrasta 4 жыл бұрын
i would recommend u to buy the gfg ds algo course for 2500...
@charannn3755
@charannn3755 3 жыл бұрын
@@shauncrasta thank you
@ayushanand2818
@ayushanand2818 4 жыл бұрын
Please increase the speed of uploading courses in this playlist as it s already delayed. Love ur work btw keep it up😇🙂
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 4 жыл бұрын
They are so behind of WHAT they promised
@pritishpattnaik4674
@pritishpattnaik4674 4 жыл бұрын
@@ghosthunternotclickbaitaka1997 bhai achha cheez banne mein time aur hard work dono lagta hai....and they are providing such a great course on youtube....so they should deserve more time
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 4 жыл бұрын
@@pritishpattnaik4674 arey bhai toh pehle badhi badhi batein kyu ki thi aese he boldete ki itna time lenge aur vese bhi last 10 videos mai koi animation bhi ni hai khaali slides he hai vese tum jese blind fans kabhi manoge he nahi
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 4 жыл бұрын
@@pritishpattnaik4674 and just rest of the comments on their recent videos of you don't believe me
@pritishpattnaik4674
@pritishpattnaik4674 4 жыл бұрын
@@ghosthunternotclickbaitaka1997 han bhai baat to tumhari bhi sahi hai😅...
@zaminraza2316
@zaminraza2316 4 жыл бұрын
thanks bhaiya
@ANANDKUMAR-jk9yp
@ANANDKUMAR-jk9yp 3 жыл бұрын
Crystall Clear Explanation!!
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky aapko
@muhammadyaqoob8211
@muhammadyaqoob8211 4 жыл бұрын
Thansk for hard word for us
@KodiLearn
@KodiLearn 4 жыл бұрын
This is not animation. This is just powerpoint slides. These types of video can be made by anyone in just 4 hrs. Then why so late?
@atharvkshirsagar5495
@atharvkshirsagar5495 4 жыл бұрын
Didi used some words of Aman Bhaiya... "Kar rahe honge"👈
@pikubhattacharjee4802
@pikubhattacharjee4802 3 жыл бұрын
int intersectPoint(Node* head1, Node* head2) { Node* p=head1; Node* q=head2; while(p) { p->data+=2001; p=p->next; } while(q) { if(q->data>=1001) return q->data-2001; q=q->next; } return -1; }
@Saurabh-gg9lv
@Saurabh-gg9lv 3 жыл бұрын
thanks dude
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky aapko
@rajatagrwl9328
@rajatagrwl9328 4 жыл бұрын
Bhaiya , aap har Baar beech mein hi course chodd dete ho .... 😭😭😭 Itni late videos aaenge to kaise consistency maintain hogi?? Aap hi batao.....
@hustlewithVaibhav
@hustlewithVaibhav 4 жыл бұрын
Thank you didi
@shivankkapila2954
@shivankkapila2954 2 жыл бұрын
But length naalne ki khud ki time complexity O(m + n) nhi hogi?
@manistrikes
@manistrikes 2 жыл бұрын
Yes...but coding contests mai pehle se hi functions mai length di hoti hai as a parameter...so we are not required to count their lengths in those contests.
@pratushporwal5815
@pratushporwal5815 2 жыл бұрын
i wanted to know why we used pos--; statement before loop void intersect(node* &head1, node* &head2, int pos){ node* temp1 = head1; pos--;
@devanshpatil5326
@devanshpatil5326 4 жыл бұрын
Bhaiya we are way behind the schedule!!
@freekeys
@freekeys 4 жыл бұрын
Length of the lambi linked list maja agai sunke👌😂
@abhishekmaurya528
@abhishekmaurya528 3 жыл бұрын
How the time complexity of the method you used is lower than the first approach, as time complexity in finding the length will be O(n+m) + O(n) n being the longer linked list
@nidhijawle3430
@nidhijawle3430 3 жыл бұрын
Same doubt
@kshitijgaikwad8343
@kshitijgaikwad8343 3 жыл бұрын
m+n TC is for finding the intersection and o(n) is for intersecting 2 linked lists... so basically for function intersection TC is m+n and for function intersect TC is n. please quote me if I'm wrong
@subhradipbarik2032
@subhradipbarik2032 3 жыл бұрын
as O(n+m) is greater than O(n) thats why it will be O(n+m). and in 1st approach we need a graph , but in this approach with same time complexity we can do it with constant space complexity .
@nidhijawle3430
@nidhijawle3430 3 жыл бұрын
@@subhradipbarik2032 thanksss😄
@subhradipbarik2032
@subhradipbarik2032 3 жыл бұрын
@@nidhijawle3430 my pleasure
@saurabhkumar5941
@saurabhkumar5941 4 жыл бұрын
aage ki videos daalo bhaiii.. zaldi see
@bhavesh5995
@bhavesh5995 4 жыл бұрын
Awesome , wonderful 👍🏻👍🏻
@shivammaurya3451
@shivammaurya3451 4 жыл бұрын
Thank u mam best explanation
@rounikprashar6715
@rounikprashar6715 4 жыл бұрын
Iski time complexity better kaise hai? Length nikalne me he O(n+m).
@rivines
@rivines 3 жыл бұрын
Ye to dono case me lagegi na
@vedant8002
@vedant8002 4 жыл бұрын
Keep up the good work 👌
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky aapko
@hvsr184
@hvsr184 Жыл бұрын
What if l1==l2 then what we do
@acva
@acva 2 жыл бұрын
Understood everything didi but this code will give error when the two lists are not linked but ptr1 and ptr2 get to null at the same point so to check for that the 'if' statement will be: if(ptr1 == ptr2 && ptr != NULL){ return ptr1->data; } :)
@SyedMuhammadAli-tr4cg
@SyedMuhammadAli-tr4cg Жыл бұрын
what if intersection point is at first node?? then we will use d = l1 - l2 or not??
@yashvats4756
@yashvats4756 3 жыл бұрын
PRO TIP-TO CREATE INTERSECTION JUST USE head2->next->next->next->next=head->next->next; TIP-My code shorter than this using same approach and also detatching a linked list from intersection if intersection is found- bool findintersection(node* head1 , node* head2) { if (head2next!=NULL) // or head1->next!=NULL { if (head2->next==head1->next) { head2->next=NULL; return 1; } head1=head1->next; head2=head2->next; } return 0; }
@romangaming5177
@romangaming5177 2 жыл бұрын
in line 94 and 95 ptr1 will never gets null because there is decremet in d,
@shashankjha9108
@shashankjha9108 2 жыл бұрын
Insertattail jb head le rha hai to usmai head1 head2 kaisai dal sktai hai
@charannn3755
@charannn3755 3 жыл бұрын
pehele tho time complexity 0(m+n) karke bathaye the..is it o(n) or o(m+n)..?
@aanchalsharma1610
@aanchalsharma1610 2 жыл бұрын
Have u used hashing in this solution?
@dipeshsharma7505
@dipeshsharma7505 4 жыл бұрын
awesome course helped a lot , how many more videos left to be uploaded for this course
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
Approximate 150 video left
@dipakdhakate5613
@dipakdhakate5613 2 жыл бұрын
Bhai placement lagi ky
@mohdhasnain3812
@mohdhasnain3812 3 жыл бұрын
at time 5:40 is this check ptr1==NULL is necessary because we are decrementing d also .. please help its line number 95
@rounaksoni2817
@rounaksoni2817 Жыл бұрын
if the intersection point is the first point then?
@tejasjoshi9140
@tejasjoshi9140 4 жыл бұрын
When is webd course comming
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
Bhai chalra hai apna college per hi
@tejasjoshi9140
@tejasjoshi9140 4 жыл бұрын
@@nitinchandel4786 ha aaj upload hua
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
@@tejasjoshi9140 na bhai 10 din se bhi jyada hogye is course ko chalte
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
@@tejasjoshi9140 tum kha se ho or kya ker rahe ho
@tejasjoshi9140
@tejasjoshi9140 4 жыл бұрын
@@nitinchandel4786 pata hai bhai sari videos dheki hai mene
@rashadahmed2919
@rashadahmed2919 4 жыл бұрын
videos daily basis pe upload ku nhi ho rahi hain? way toot raha hai poora
@mr.jyotiranjankalta8098
@mr.jyotiranjankalta8098 4 жыл бұрын
Bhai itna vi deri kyu aur video ayega vi ya nahi
@prathvishetty9802
@prathvishetty9802 4 жыл бұрын
Why java placement course is stopped 😣
@omarmahmood6891
@omarmahmood6891 4 жыл бұрын
because aman dhattarwal fired anuj bhaiya
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
@@omarmahmood6891 why aman bhaiyya fired anuj bhaiyya
@omarmahmood6891
@omarmahmood6891 4 жыл бұрын
@@nitinchandel4786 He wanted to start the new C++ course with highly trained professionals. So he stopped the Java course.
@criminalcoder6307
@criminalcoder6307 4 жыл бұрын
@@omarmahmood6891 lol duffer anuj Bhaiya leave Aman dhattarwal. Entire world knows who is better and who is just barking dog.
@namanjain7710
@namanjain7710 4 жыл бұрын
@@omarmahmood6891I don't think this will complete too becuz they are way way way more behind than what they promised see timeline video on his main channel
@anildhasade3828
@anildhasade3828 4 жыл бұрын
Aman bhaiya told that lectures are divided into phase 1 and phase 2 is phase 1 completed already can any one please tell me
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 4 жыл бұрын
not even one fourth they are very late with the timeline which they gave see the timeline pdf on his main channel
@ankurkhandelwal1375
@ankurkhandelwal1375 3 жыл бұрын
In the last while loop, can't we use OR operator instead of AND ?
@funnykidz2837
@funnykidz2837 3 жыл бұрын
No , bcse if any of the ll will reach at end that means there is no intersection pt. In between.
@yashvats4756
@yashvats4756 3 жыл бұрын
WE CAN USE ANY , INFACT WE CAN JUST TAKE WRITE ANY ONE
@Learnwith-jyoti
@Learnwith-jyoti 2 жыл бұрын
what if case-1 : k==1 case-2 : k==length of linkedlist 🙄🙄
@Simpleperson1414
@Simpleperson1414 4 жыл бұрын
Sir, My college is teaching python in first year and java from 2nd year But I want to learn C++ because your teaching it, what to do ??
@Mr__Impeccable
@Mr__Impeccable 4 жыл бұрын
I will watch it later coz I'm in 1st sem now..(just came to like the video) 🥴
@MohammadKhan-ld1xt
@MohammadKhan-ld1xt 4 жыл бұрын
Bro if you are in the first semester I strongly advise you to see all the videos in his playlist . By the time you are in the 2nd year you can practice algorithm and by the end of 4th semester you will be doing exceptionally well. Just an advice , it's your choice though it will help you a lot 😉
@Mr__Impeccable
@Mr__Impeccable 4 жыл бұрын
Thanks Bhai.... string tk Kiya hai abhi ..isi playlist k through
@MohammadKhan-ld1xt
@MohammadKhan-ld1xt 4 жыл бұрын
@@Mr__Impeccable Sahi hein mein bhi 1st semester mein hi huu.
@ernatertan1827
@ernatertan1827 4 жыл бұрын
❤️❤️
@BCS-ot5bf
@BCS-ot5bf 4 жыл бұрын
Can anybody tell when this course going to complete so i could make proper time table
@arnavraj9094
@arnavraj9094 4 жыл бұрын
1.5 months
@namanjain7710
@namanjain7710 4 жыл бұрын
It will take much more time they are not at the pace they promised that they'd be see they said 6 Jan graphs would be completed but now not even linkedlist is complete
@anony12mous
@anony12mous 4 жыл бұрын
Why it gives error: 'i' does not name a type
@r1sh149
@r1sh149 4 жыл бұрын
Iss video me to 0 animation tha sirf ek slide ke upar explain kiya and then code to baki videos upload karne main itna late kyu ho raha hai🙄🙄
@srij_12
@srij_12 2 жыл бұрын
Solution in java public class Solution { public int length(ListNode head) { ListNode temp = head; int count=0; while(temp!=null) { count++; temp = temp.next; } return count; } public ListNode getIntersectionNode(ListNode headA, ListNode headB) { int l1 = length(headA); int l2 = length(headB); int diff_len = Math.abs(l1-l2); ListNode ptr1 = null; ListNode ptr2 = null; if(l1>l2) { ptr1 = headA; ptr2 = headB; } else { ptr1 = headB; ptr2 = headA; } while(diff_len>0) { ptr1 = ptr1.next; diff_len--; } while(ptr1!=ptr2) { ptr1 = ptr1.next; ptr2 = ptr2.next; } return ptr1; } }
@it_does_matter
@it_does_matter 3 жыл бұрын
In the intersection code part where (head1,head2,int pos),what does that pos signify.Its value was taken as 3,is it position or value
@Drogon-Gaming
@Drogon-Gaming 3 жыл бұрын
it means the third node from the head
@bkbhushan5331
@bkbhushan5331 3 жыл бұрын
I think it should be 5 as taken in the example of the video since we are intersecting the 5th node of the first linked list
@VikashSingh-kg8xr
@VikashSingh-kg8xr 3 жыл бұрын
7:08 kuchh samjh nhi aaya thoda dheeme dheeme
@aas-vlog1
@aas-vlog1 4 жыл бұрын
Apni kaksha par java placement cource kab continue hoga aap wahin se bhi start kar sakte hain hame wahan se koi reply mila nhi Yaa fir aap hame age ka path bata do pls
@itsaryanguys
@itsaryanguys 4 жыл бұрын
❤️🙏
@pk4288
@pk4288 3 жыл бұрын
can anyone explain line 41 me pos-- kyu kara gaya hai?
@anumoynandy5811
@anumoynandy5811 3 жыл бұрын
index=pos-1(that is why post decremeter operator is used)
@harshpanwar1550
@harshpanwar1550 2 жыл бұрын
🙏🙏🙏🙏🙏🙏
@melodytunes2204
@melodytunes2204 3 жыл бұрын
agar hum length nikalenge tab bhi toh time complexity n+m hojayegi
@kailashsahoo1209
@kailashsahoo1209 4 жыл бұрын
When python course is coming, bhaiya
@nitanshuranjan2272
@nitanshuranjan2272 4 жыл бұрын
which college
@himanshusharma-tj1bt
@himanshusharma-tj1bt 4 жыл бұрын
bhaiya video jaldi upload kiya karo
@techsolutions3406
@techsolutions3406 4 жыл бұрын
Bhaiya agar video animated karna m time lag raha h tho video asa h upload kar di bina animation k par time par upload karo , hamre career ka sawal h ..agar time lagaga upload hone m tho asa bato ham or kahi se reference kare par kam se kam sahi bola k bta do juti tasali mat do jse phle kaha tha course lauch karta time ki January tak graph topic tak upload kar doge videos par abi tak tho linkedlist k video h sare upload nahi kiya 🤦😡😡😡😡😡😡😡😡😡😡😡😠😠😠
@nickatytepro8690
@nickatytepro8690 2 жыл бұрын
how ptr 1 becomes NULL if its length is already greater than d??
@manistrikes
@manistrikes 2 жыл бұрын
If the second list of of 0 length ...then d= length of 1st list and we reach ptr1=Null
@thedreamballer
@thedreamballer 4 жыл бұрын
Bhaiya bas heart dedo bhaiya plzzzzzzzzz
@melodytunes2204
@melodytunes2204 3 жыл бұрын
heart ❤❤
@atulraj8381
@atulraj8381 4 жыл бұрын
Can we don't use only head1 and head2 instead of &head1 and &head2 ? Please someone explain clearly
@learningoverflow3138
@learningoverflow3138 3 жыл бұрын
we want address of head1 head2 cos we r gonna be making temporary nodes to traverse
@hustlewithVaibhav
@hustlewithVaibhav 4 жыл бұрын
Bhaiya please upload next video
@anu3872
@anu3872 3 жыл бұрын
I'm getting a segmentation fault, can anyone pls help? #include using namespace std; class Node { public: int data; Node *next; Node(int val, Node *n = NULL) { data = val; next = n; } }; void insertAtTail(Node *&head, int val) { Node *n = new Node(val); if (head == NULL) { head = n; return; } Node *temp = head; while (temp->next != NULL) { temp = temp->next; } temp->next = n; } void display(Node *&head) { Node *temp = head; while (temp != NULL) { cout data next; } cout n) { head1 = head1->next; m--; } while (n > m) { head2 = head2->next; n--; } while (head1 != NULL && head2 != NULL) { if (head1 == head2) return head1->data; head1 = head1->next; head2 = head2->next; } return -1; } void makeIntersect(Node *head1, Node *head2, int pos) { Node *temp1 = head1, *temp2 = head2; while (temp1 != NULL && --pos) temp1 = temp1->next; while (temp2->next != NULL) temp2 = temp2->next; temp2->next = temp1; } int main() { Node *head1 = NULL, *head2; insertAtTail(head1, 1); insertAtTail(head1, 2); insertAtTail(head1, 3); insertAtTail(head1, 4); insertAtTail(head1, 5); insertAtTail(head1, 6); insertAtTail(head2, 9); insertAtTail(head2, 10); makeIntersect(head1, head2, 3); display(head1); display(head2); cout
@NormieCyrox
@NormieCyrox 3 жыл бұрын
base case change karo
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
Is course me aproximate kitni video hogi pls koi btao
@kaushittejwani5839
@kaushittejwani5839 4 жыл бұрын
how many videos are remaining in this playlist
@nitinchandel4786
@nitinchandel4786 4 жыл бұрын
150
@sandeepkumarsingh4802
@sandeepkumarsingh4802 4 жыл бұрын
kya yaar bhaiya...........aese kaise chalega..........january mein course complete karne ka promise kiya tha aapne.....ab lag raha hai march tak bhi khatam nhi hoga.
@RishabhMazumdar
@RishabhMazumdar 3 жыл бұрын
Free mein quality content mil raha utna hi kafi nahi hai kya?
@ytg6663
@ytg6663 3 жыл бұрын
@@RishabhMazumdar or Free me Dhokha bhi 👍
@ytg6663
@ytg6663 3 жыл бұрын
Sahi bola vro sandip
@mdekramuddin8534
@mdekramuddin8534 3 жыл бұрын
Hello..I want to know that does this playlist contains complete c++ and DSA ? I want to start
@subhadeepghosh2813
@subhadeepghosh2813 4 жыл бұрын
waiting for nxt one
@sawi494
@sawi494 3 жыл бұрын
Plz also provide full code 🙂🙂
@gokulnaathb2627
@gokulnaathb2627 3 жыл бұрын
Nice explanation
@seemasamridhi8348
@seemasamridhi8348 4 жыл бұрын
ethical hacking P lzz respond i wanna learn it....
@anurag_goel6232
@anurag_goel6232 3 жыл бұрын
No notes in description box
@namanjain7710
@namanjain7710 4 жыл бұрын
As expected yeh course bhi delay hogaya khaali pehle upar jadhate ho timeline waali video dekho sabh usmai 6 Jan tak graphs hona tha aur yaha toh linkedlist bhi khatam nahi kiya abh meri placements hai batao bhaiya aapke uspar depend tha pehele timeline galat di he kyu👺👺
@shivamuttpaljha3134
@shivamuttpaljha3134 4 жыл бұрын
Bhai ye timeline wali video konsi hai Link de toh zara
@shivamuttpaljha3134
@shivamuttpaljha3134 4 жыл бұрын
Bhai ye timeline wali video konsi hai Link de toh zara
@namanjain7710
@namanjain7710 4 жыл бұрын
@@shivamuttpaljha3134 kzbin.info/www/bejne/Y3qlfpp8l82VkLc
@namanjain7710
@namanjain7710 4 жыл бұрын
@@shivamuttpaljha3134 kzbin.info/www/bejne/Y3qlfpp8l82VkLc
@057navneetdiwan6
@057navneetdiwan6 3 жыл бұрын
please upload the notes
@katanaop3261
@katanaop3261 4 жыл бұрын
please upload notes.
@obamaengineer4806
@obamaengineer4806 3 жыл бұрын
notes?
@techsolutions3406
@techsolutions3406 4 жыл бұрын
😡😡😡😡😡Bhaiya agar video animated karna m time lag raha h tho video asa h upload kar di bina animation k par time par upload karo , hamre career ka sawal h ..agar time lagaga upload hone m tho asa bato ham or kahi se reference kare par kam se kam sahi bola k bta do juti tasali mat do jse phle kaha tha course lauch karta time ki January tak graph topic tak upload kar doge videos par abi tak tho linkedlist k video h sare upload nahi kiya 🤦😡😡😡😡😡😡😡😡😡😡😡😠😠😠
@rachitjaiswal8249
@rachitjaiswal8249 4 жыл бұрын
Theka nhi liya hai bhaiya ne
@sarveshpatil5415
@sarveshpatil5415 4 жыл бұрын
Java animated kab ayega sir
Merge 2 Sorted Linked List | C++ Placement Course | Lecture 22.9
9:02
L12. Find the intersection point of Y LinkedList
32:05
take U forward
Рет қаралды 96 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Intersection of Two Linked Lists - Leetcode 160 - Python
8:13
How to Use the Two Pointer Technique
10:56
Team AlgoDaily
Рет қаралды 121 М.
Watch this before you start Coding! 5 Tips for Coders
13:53
Apna College
Рет қаралды 482 М.
Why People Quit Coding? 3 Major Reasons
17:36
Apna College
Рет қаралды 1,6 МЛН
L23. Merge two sorted Linked Lists
18:55
take U forward
Рет қаралды 86 М.
5 Secrets to Stop Stuttering & Speak More Clearly!
12:44
Vinh Giang
Рет қаралды 137 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН