Find Intersection point of 2 Linked List | Lecture 22.8

preview_player
Показать описание
Notes of this Lecture:
Рекомендации по теме
Комментарии
Автор

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

akshayan
Автор

mam apke padhane ke tarike se apka fan ho gaya hu
best tarika hai apka koi chij samajhane ka

shaileshyadav
Автор

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) ?

prakhar
Автор

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

abhaygupta
Автор

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 u aman baiya and all the team members love u guys ...

suhailahmad
Автор

Hello Bhaiya!!! Eagerly waiting for rest of the course. You all did a great job but please don't delay the course.

gauravkumar-ctdh
Автор

Bhaiya please complete this course soon its already being very late, Lots of students waiting for this 🙏🙏🙏

KrishnaGupta-xdxu
Автор

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!!!!

broskie_ceo
Автор

node* intersectionY(node* head1, node* head2) {
if (head1 == NULL || head2 == NULL) return NULL;

node* temp = head1;
map<node*, int> 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<<temp->data<<" ";
temp = temp->next;
}
return NULL;
}int main()
{
vector<int> arr={3, 1, 4, 6, 2};
vector<int> b={1, 2, 4, 5, 4, 6, 2};
node *head1=convertarrtoLL(arr);
node* head2=convertarrtoLL(b);
node* head=intersectionY(head1, head2);
if (head != nullptr) {
cout << "Intersection found at value: " << head->data << endl;
} else {
cout << "No intersection found." << endl;
}


}1 2 4 5 4 6 2 No intersection found.?? pls tell me why its not coming??imtrying it from past 4 hrs still i can't pinpoint my mistake?

kale-lbpr
Автор

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 🙏

chotuagrawal
Автор

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;
}

pikubhattacharjee
Автор

Please cover the most popular Leetcode challenges ko bhi include kar do bhai.
[Difficulty = Hard vale]

akashthoriya
Автор

Thanks sis.
It's very helpful for me

PrakashKumar-vrwc
Автор

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.

krishnananddubey
Автор

Please increase the frequency of the video.

SatendraKumar-mkui
Автор

Didi used some words of Aman Bhaiya...
"Kar rahe honge"👈

atharvkshirsagar
Автор

Wonderfully explained. Thanks for great content. :)

pinkeshpatel
Автор

Bhaiya we are way behind the schedule!!

devanshpatil
Автор

Length of the lambi linked list maja agai sunke👌😂

freekeys
Автор

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?

KodiLearn