Reverse Sublist of Linked List | Reverse Linked List II

preview_player
Показать описание
In this video, I have explained how to reverse a linked list between 2 positions.
Given the head of a singly linked list and two integers left and right, reverse the nodes of the list from position left to position right, and return the reversed list.
This question is also known as following:
- Reverse Sublist of Linked List
- Reverse specified portion of a Linked List
- Reverse a Linked List from position M to N

00:00 Introduction
00:08 Problem Explanation
01:39 Solution
09: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:

For Binary tree tutorials, please refer to the below playlist:

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

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

#DataStructure,#LinkedList,#FitCoder,#Algorithm,#competitiveprogramming,#faang,#codinginterview
Рекомендации по теме
Комментарии
Автор

00:00 Introduction
00:08 Problem Explanation
01:39 Solution
09:27 Implementation

FitCoder
Автор

thanks brother for helping to grasp this concept

technicalfriend
Автор

BROTHER THAT WAS SMOOTH, TOO MUCH GOOD CONTENT, subbed

nikhilpawariaaa
Автор

at 7:12 You need to check the case when n==length of LL. So the afterRightNode will be undefined (length+1). Need to check the same case as we checked for beforeLeftnode is null or not

buzzfeedRED
Автор

Wonderful Explanation to the point tysm!!

princeagrawal