Intersection of Two Linked Lists Leetcode | Leetcode 160 | Approach + Code | C++

preview_player
Показать описание
Intersection of Two Linked Lists Leetcode | Leetcode 160 | Approach + Code | C++

Hi
Welcome To our channel Code Bashers.

About Video:
This video is about finding the node where two linked list are intersecting together .
watch the video for understanding..

Queries solved in this video:
1)What is the meaning of intersection of two linked list.
2)Explanation of intersection of two linked list through examples.
3)Approach of solving intersection of two linked list.
4)Code for intersection of two linked list in c++.

See video for explanation with example and dry run.

Complexity Analysis:
Time Complexity : O(N)
Space Complexity : O(1)

#codinginterview #placementquestion #leetcode #linkedlist #code

Please Like , Share , Subscribe and forward it to your friends.

Thank You

More Linked List Videos:

Merge two sorted linked list leetcode | Leetcode 21 | Inplace Solution | O(1) space Complexity :

Add two numbers represented by linked lists leetcode | Leetcode 2 | (Approach + code) in C++ :

Remove Nth Node From End of List Leetcode | Leetcode 19 | Single Pass Solution :

Delete Node in a Linked List Leetcode | Leetcode 237 | O(1) Solution

Intersection of Two Linked Lists Leetcode | Leetcode 160 | Approach + Code | C++

Rotate List Leetcode | Leetcode 61 | Leetcode October Challenge

Linked list cycle Approach | Leetcode 141 | easily explained both O(N) and O(1) space approach

Linked List Cycle 2 | Leetcode 142 | O(N) space and O(1) space Approaches

Reverse Linked List Leetcode | Leetcode 206 | Iterative Approach :
Рекомендации по теме
Комментарии
Автор

but if they are not intersection so in that case we return null also, u can't return null anywhere in the code?

deepanshu.sharmaa
Автор

In first example why they are not intersecting at 1 instead of 8?

shyamjitiwari