Reverse Linked List II - LeetCode #92 | Python, JavaScript, Java and C++

preview_player
Показать описание
Let's solve Reverse Linked List II with Python, JavaScript, Java and C++ LeetCode #92! This is LeetCode daily coding challenge on September, 7th, 2023.

Check out my latest tutorial video on solving the "Reverse Linked List II" programming problem. In this video, we explore how to efficiently reverse a portion of a linked list specified by two indices, m and n. The Reverse Linked List II problem challenges us to reverse the linked list nodes between positions m and n, inclusive. Through detailed explanations and code demonstrations, we discuss various approaches to solving this problem, considering both time and space complexities. Whether you're a beginner or an experienced coder, this tutorial provides valuable insights into tackling the Reverse Linked List II problem effectively. Watch the video now and learn how to implement the reverse operation for linked lists with confidence!

------------------------------------------------------------------------------------------------------
⭐️ Please subscribe to my channel from here.

⭐️ Relaxing Channel I've been working on. Please subscribe from here.

⭐️ I write an article about this question. Please upvote it!
------------------------------------------------------------------------------------------------------

■ Timeline
0:00 Read the question of Reverse Linked List II
0:35 Explain how to solve Reverse Linked List II
5:15 Coding
7:50 Time Complexity and Space Complexity

■ Blind 75 LeetCode questions

■ Twitter

■ Instagram

■ Problem Link

■ Codes in the video
- Python

- JavaScript

- Java

- C++

■ Playlists

#pythonprogramming #leetcode #algorithm #coding #programming #python #javascript #java #cplusplus
Рекомендации по теме
Комментарии
Автор

Thanks, bro. This approach is much more helpful than the one I came up with, but how did you develop this logic? Seriously, I needed clarification about how we can come up with this kinds of logic. Can you give me insights into this?.

DEVIREDDYVISHNUVARDHANAREDDY
Автор

I'm confused. In the second iteration of the for loop, when you change temp to cur.next does that not also change prev.next, as it was pointing to temp? In which case when setting temp.next = prev.next, prev.next would be equal to temp (4) and it would just go back to 1->2->3->4->5.

noahsivinski
Автор

bro stop doing problems like you are doing it for yourself. try to hold and explain the every process. think what other would stuck on and could be helpful. this is such an unhelpful video. your channel wont grow like this.

prithakshrestha
join shbcf.ru