Intersection of Two Linked Lists

Опубликовано: 19 Октябрь 2024
на канале: Fit Coder
505
11

In this video, I have explained how to find intersection node of two linked lists.
Given the heads of two singly linked-lists head1 and head2, return the node at which the two lists intersect. If the two linked lists have no intersection at all, return null.
I have explained two methods to solve this:
Method 1: Using Extra Space
Method 2: Using 2 pointers, No Extra Space

Source code: https://github.com/fit-coder/fitcoder...

00:00 Introduction
00:08 Problem explanation
01:20 Method 1: Using Extra Space
04:41 Method 2: Using 2 pointers, No Extra Space
08:27 Implementation

-------------------------------------------------------------
I live in New Delhi and love explaining programming concepts. I have done M.Tech(BITS Pilani) + B.Tech(PEC, Chandigarh) in Computer Science and am currently working as a software engineer in a MNC.
If you like my content, please like, share my videos and subscribe to the channel.
-------------------------------------------------------------

For Linked List tutorials, please refer to the below playlist:
   • Linked List  

For Binary tree tutorials, please refer to the below playlist:
   • Tree Data Structures  

For Binary search tree tutorials, please refer to the below playlist:
   • Binary Search Tree  

For in-depth Graph theory and implementation details, please refer to the below playlist:
   • Graph Algorithms  

#DataStructure,#LinkedList,#FitCoder,#Algorithm,#competitiveprogramming,#faang,#codinginterview