Copy List With Random Pointer (LeetCode 138) | Full Solution with animations and 3 step process

  Рет қаралды 2,763

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Join this channel to get access to perks: / @nikoo28
Actual problem on LeetCode: leetcode.com/problems/copy-li...
Chapters:
00:00 - Intro
00:41 - Problem Statement
02:44 - What is this special structure?
04:50 - Brute Force Approach
07:26 - Step 1 (Create new list with same values)
10:05 - Step 2 (Copy the random pointers)
13:53 - Step 3 (Separate the 2 lists)
18:16 - Dry-run of Code
20:15 - Final Thoughts
📚 Links to topics I talk about in the video:
Linked Lists: • Linked List Data Struc...
What is Big O?: • Big O Notation Simplif...
Time Complexity of an algorithm: • What is the Time Compl...
Other Medium Problems: • Medium Problems
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
Test-cases on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/3sJm8Wl
Favorite book to understand algorithms: amzn.to/4848xJH
Favorite book for data structures: amzn.to/3P96YBv
Get started for interview preparation: amzn.to/44Nn5du
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3PdsViT
Microphone: amzn.to/3Exv83x
Recording Camera: amzn.to/3PwyN8e
Tablet to sketch and draw: amzn.to/3ZdKVy7
Sketching Tool: amzn.to/45XJEgY
Laptop to edit videos: amzn.to/460ofDu
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#leetcode #programming #interview

Пікірлер: 7
@prashanthshetty8337
@prashanthshetty8337 4 ай бұрын
I watched many videos on this problem, you got the best and easy to follow and understand. Thank you so much. I was able to solve this just with your explanation.
@nikoo28
@nikoo28 4 ай бұрын
Great to hear!
@Handlefor
@Handlefor Ай бұрын
That was a great explanation. Thank you.
@hukum5726
@hukum5726 2 ай бұрын
Whenever i search questions related to leetcode on KZfaq at last i just add nikhil lohia❤
@rishavsandal4561
@rishavsandal4561 3 ай бұрын
great explanation video i would highly reccomend you to use some dark color background like dark green , dark blue the white board irritating to eyes man. 😘 love your content.
@nikoo28
@nikoo28 3 ай бұрын
It is difficult to make diagrams on a dark background. Will keep using white for now
@JANARDHEN
@JANARDHEN 21 күн бұрын
I don't know if you have time to see comments. Thank you for the solution. I have a question. We are creating n extra nodes ( copied node). So, is the space O(n) ? How is it O(1) ? We are modifying by adding more nodes.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН
Я не голоден
01:00
К-Media
Рет қаралды 9 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 24 МЛН
Alternate Logic Gates
8:27
TechnoLearn
Рет қаралды 22
Copy List with Random Pointer - Linked List - Leetcode 138
10:07
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 294 М.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН