Lecture 52: Clone a Linked List with Random Pointers || C++ Placement Course

  Рет қаралды 151,547

CodeHelp - by Babbar

CodeHelp - by Babbar

Күн бұрын

Пікірлер: 275
@todayscreator8662
@todayscreator8662 2 жыл бұрын
Bhaiya linked list m thoda sa confusion hora tha starting m par fir do teen video dekhne k baad ab maje aa rhe h linked list k questions karne m
@sangrambiradar9461
@sangrambiradar9461 2 жыл бұрын
Hello guys, it doesn't matter how smart or dumb or lucky you are, if you are consistent enough you can outwork all the people who you think are talented or smarter than you. #consistancy #linked list
@vishalplayzz2580
@vishalplayzz2580 2 жыл бұрын
🙂yeah man u are right
@suyashjain3223
@suyashjain3223 Жыл бұрын
3 different Approaches for Single Question. Itna to koi paid courses me bhi nhi btata .Thanks a lot bhaiyaa ❤❤❤
@shikharverma5824
@shikharverma5824 2 жыл бұрын
we know you are observing a constant decline in views,but its just because we are left behind and your content is amazing,Thanks for creating the content and for your efforts
@259_parthpatidar9
@259_parthpatidar9 2 жыл бұрын
yes correct
@piyushsharma6505
@piyushsharma6505 2 жыл бұрын
No one can match the commitment and dedication of Love Bhaiya towards teaching and making sure we comprehend the concept easily
@dudamneerajdattu1459
@dudamneerajdattu1459 3 ай бұрын
33:04 after listening to this approach, i was like 🤯🤯, aisa kaise soch bhi sakthaa hai
@harsh55
@harsh55 2 жыл бұрын
pheli bar gfg pe love bhai ka solution dekhe bina one shot mein probelm nikal li (of course approach 1 se) . Inutution a raha hai . Thank you! you rock
@ayushkushwaha171
@ayushkushwaha171 2 жыл бұрын
Maine khud se bhi kaafi socha for any brute force approach. I was very close to the solution that u provided. Really felt amazing by my improvement. Thanks bhaiya!
@computerguy3550
@computerguy3550 Жыл бұрын
BHAIYA JI BOHOT TEZZ BOHOT HI JADDA BADIYA APPROACH 3 MAZA HI AHHHGYA, APPKI ENERGY EK ALAG HI LEVEL HAI THANKS BHAI.👌👌👌👌
@Mb-nr5nz
@Mb-nr5nz 2 жыл бұрын
Aapka content itna acha hai bhaiya ki aisa lag raha hai aap placement laga ke hi chodoge , waise abhi aaphi ka video dekh raha tha pointers wala , kya easily samjhaya hai , thanks big brother ❤️
@sahilsoni4299
@sahilsoni4299 Жыл бұрын
placement hui fir?
@Ayush_.
@Ayush_. 2 жыл бұрын
i watched this video 2 times 🤩🤩fir bhi borring nhi laga just bcz of your amazing explaination bhaiya 🔥🙌
@varun-qm3xj
@varun-qm3xj 2 жыл бұрын
pushing limits... last approach me maza he aagai bhaiya code krne me
@suvigyabasnotra7378
@suvigyabasnotra7378 2 жыл бұрын
sections of code to the original diagram/ approach you've made on the iPad...? Requesting this because it gets unnecessarily hard to visualize all the code so fast mentally! In other words, explain each of the lines of different sections of code, comparing it with the iPad approach after you're done coding. Explain like... this line is doing this and this one is doing this, back in the approach rather than just simply wafting over the sections like at 54:07 which we already understand. This method of teaching would really help and prove to be icing on the cake for a lot of us. Thanks for your consistent efforts!
@iEntertainmentFunShorts
@iEntertainmentFunShorts 2 жыл бұрын
Bhaiya m thoda peeche chal rha tha qki Maine 450 and leetcode k problems bhi lagayei Linked list pr toh frequency slow mat krna, map wali approach toh Maine khud se sochi thy but jo 3rd approach thy that was like 🔥🔥 PS: Thank you so much bhaiaya this question was like🔥
@ankitsaha675
@ankitsaha675 2 жыл бұрын
Shaaandaaar series chal rha h bhaiya. 🔥🔥
@atharvakadam4701
@atharvakadam4701 2 жыл бұрын
Though the video was long but I couldn't get such a great explanation in any KZbin video! great content.
@kpsingh2647
@kpsingh2647 Жыл бұрын
Rula diya is question ne
@saurabhrajput7492
@saurabhrajput7492 2 жыл бұрын
Pahale linked list mere faad dete the ab me linked list ki faad deta hu...time change bro ||......LOVE YOU BRO.........||
@shiriii-x9h
@shiriii-x9h 2 жыл бұрын
Love this course🥰... live talk se motivation => reminding to be consistent in course😇
@eshaanpandey7353
@eshaanpandey7353 2 жыл бұрын
Hashmap solution was easily understandable, I won't remember Approach 3
@anushkayachit
@anushkayachit 2 жыл бұрын
mai to kal mazaak me boli thi video chahiye.... aapne to sach me daaldi... kya aadmi ho yarr 😂😂 chalo anyway.... thank you🖤🖤
@uttamkesarwani6143
@uttamkesarwani6143 2 жыл бұрын
We need Handwritten Notes rest of Lectures, It's really time savings. When we have to revise, then I think all of us use that beautiful Notes. Otherwise it again a long time to see video again.
@akashsharma9674
@akashsharma9674 8 ай бұрын
khud bana le na bhai.
@JatinKumar-w7f
@JatinKumar-w7f 9 ай бұрын
class was really amazing and I felt it very cool in coding, Thanks sir for this one and truly speaking, This is the first time that I am saying someone thanks for this kind of teaching. Thanks to make these video and it is helping me a lot in getting my goals.😊😊😊😊
@prashantbirajdar9271
@prashantbirajdar9271 2 жыл бұрын
wahh bhiyaa maja aa gyaa..❤ sub smaj aa gya hume 🤩🤩👍👍
@singhharsh8019
@singhharsh8019 2 жыл бұрын
Thank you bhaiya for providing nicest dsa content and it's quality is just the best out there....No other course even come close to the simplicity and quality of this content....so thank you again and keep going
@aryansen2410
@aryansen2410 6 ай бұрын
solid lecture babbar bhaiya
@keshavarya7918
@keshavarya7918 2 жыл бұрын
Sahi video bana di 👍👍.......isme rehti thi mujhe thoda confusion
@fahadabdullah687
@fahadabdullah687 2 жыл бұрын
babbar bhai absolutely loved loved loved.... the way you built it...Just one thing, please don't use red to write things down on dark background...use some other colors which make contrast better and readable.
@dhanushsingh9541
@dhanushsingh9541 3 ай бұрын
Best DSA series out there thank you for this😊
@Spike_104
@Spike_104 Жыл бұрын
51:25 nahi aa sakta upar waale logic me temp->next me NULL. Kyunki temp traverse to original list ke element ko kar raha hai aur Har original node ke baad uska clone node toh ana mandatory hai to temp -> next kabhi bhi NULL nahi hoga kyunki wo humesa apne clone ke counterpart ko point karega.
@ujjwalverma_
@ujjwalverma_ 2 жыл бұрын
Consistency++ Maja aa rha boht, Enjoying this course
@suvigyabasnotra7378
@suvigyabasnotra7378 2 жыл бұрын
24:06 arb = arbitrary.
@haiderali0801
@haiderali0801 2 жыл бұрын
Bhaiya awesome.... Bht maza aa rha.....❤️
@fnGamingz
@fnGamingz 2 жыл бұрын
bhai log jo log view kar rhe ho, kam se kam like to karte jao, kuch to support karo yaar, humbble request. Thanks
@prathyyyyy
@prathyyyyy 2 жыл бұрын
nice vid keep doing and also take care of your health! you've been working hard!!
@deepaklavate4165
@deepaklavate4165 2 жыл бұрын
High effort and high quality content Thank you bhaiyyq
@keshavgambhir9894
@keshavgambhir9894 2 жыл бұрын
Amazing approach bhaiya 🔥🔥🔥 Thanks for video 🙏🙏🙏🙏
@pranavthakur7471
@pranavthakur7471 2 жыл бұрын
present hai bhaiya. but abi mai series follow nhi kr pa raha hu,due to some reason but aap videos daalte rhna........ mai yahi se padhunga..bhaiya...thank you so much
@utkarshsingh1457
@utkarshsingh1457 2 жыл бұрын
Sab samajh aagya..thanks for the video!!
@ayushp4471
@ayushp4471 2 жыл бұрын
Loved this course ❤❤ Thank you Bhaiya🔥🔥
@ravivishvas3676
@ravivishvas3676 2 жыл бұрын
thanks for giving the amazing content in amazing way
@KratosProton
@KratosProton 2 жыл бұрын
Crystal clear explanation bhai!
@yadvibhalla5392
@yadvibhalla5392 2 жыл бұрын
Best DSA course
@arhamhasan9474
@arhamhasan9474 Жыл бұрын
Incredibly well explained, and the last approach is lit🔥
@vivan1852
@vivan1852 2 жыл бұрын
Bhaiya aapki consistency op hai ...
@RohitSingh-hc8yi
@RohitSingh-hc8yi Жыл бұрын
Attendance marked
@prachiharley
@prachiharley 2 жыл бұрын
kafi asan banaya apne yeh...
@avin_gaur
@avin_gaur 5 ай бұрын
whole day spent in this (skill issue)
@rajbohara1649
@rajbohara1649 5 ай бұрын
us
@kurma3992
@kurma3992 Жыл бұрын
Great bhaiya❤
@RohitRana-tz2lr
@RohitRana-tz2lr 2 жыл бұрын
Thanks bhaiya for this explaining this amazing question... mja hi aa gya aapse ye question samajkr
@AA-wy9vw
@AA-wy9vw 2 жыл бұрын
Loving the series.
@aayushgoswami8632
@aayushgoswami8632 Жыл бұрын
Hiii.. just one suggestion -> at 46:40 you can also use while(temp != NULL){ if(temp -> arb != NULL){ temp -> next -> arb = temp -> arb -> next; } else{ temp -> next -> arb = temp -> arb; } temp = temp -> next -> next; } because temp -> next won't be equal to NULL ever.
@sagardebnath8842
@sagardebnath8842 Жыл бұрын
Correct ✅
@akshatmalviya8563
@akshatmalviya8563 10 ай бұрын
Yes , the condition of temp->next getting NULL will never be true . We can remove also
@righttoright829
@righttoright829 2 жыл бұрын
yo yo yo question me maje aa rhe hai
@shreyanshthakur5405
@shreyanshthakur5405 2 жыл бұрын
Hey guys, do you guys code along with bhaiya and submit the solution Or you code by self after watching the lecture ? Just curious about different study approaches.
@utkarshpatidar167
@utkarshpatidar167 2 жыл бұрын
2nd one..
@paracetamol9116
@paracetamol9116 11 ай бұрын
try to solve it before watching the video at 2x
@codeplug
@codeplug Жыл бұрын
approach 3 was awesome bhai!
@rachit_joshi
@rachit_joshi 8 ай бұрын
Thank You So Much BHRATA SHREE !!!!!
@vyankateshzawar7999
@vyankateshzawar7999 Жыл бұрын
maza aagaya bhai approch sunke
@adityatripathi931
@adityatripathi931 2 жыл бұрын
Attendance done♥️
@mukeshkaser3077
@mukeshkaser3077 2 жыл бұрын
Attendence done bhaiya 🙌🏼
@poojayadav695
@poojayadav695 2 жыл бұрын
THANKYOU FOR THE COURSE.................................
@aashutoshagrawal5239
@aashutoshagrawal5239 Жыл бұрын
I watched first video of yours to understand basic concepts of linked list then I open leetcode with linkedlist structured problems then I end up by finishing that with finishing this playlist .. lol 😂 great work .. it took me around 1 month to understand concepts of linkedlist and in this my oops concepts were also brushed up
@PriyanshuSrivastava11fig
@PriyanshuSrivastava11fig 2 жыл бұрын
present bhaiya !!! awesome series ❤️❤️❤️
@sanatandharmyogicculture700
@sanatandharmyogicculture700 2 жыл бұрын
Clone a Linked List with Random Pointers || C++ Placement Course
@prashantagarwal2455
@prashantagarwal2455 2 жыл бұрын
Nice explanation of such a topic😭😭
@funwithrayhan9579
@funwithrayhan9579 Жыл бұрын
masterclass bhai.. love from BD
@kunalsehgal8036
@kunalsehgal8036 2 жыл бұрын
bhaiya you are brilliant..... this is the first time for me when i guessed approach3 accurately. seriously this series is very helpful and content quality is very very good from basics to advance. keep it up!! Thankyou
@ekengineer9868
@ekengineer9868 2 жыл бұрын
Consistency++ Motivation girne nahi deni✊ I'm lagging a bit in lectures but will be there soon✌️
@alexrcrew1975
@alexrcrew1975 2 жыл бұрын
ok updates?
@jericodcosta2049
@jericodcosta2049 2 жыл бұрын
Attandenc marked consistency op😎
@VishnuJha-fj2bj
@VishnuJha-fj2bj 4 ай бұрын
last method was just wow loved the explanation. thankyou so much bhaiya
@kravi8034
@kravi8034 4 ай бұрын
Hi
@kravi8034
@kravi8034 4 ай бұрын
Which yr bro
@unknown2710
@unknown2710 3 ай бұрын
​@@kravi8034 1st year
@fazerugbrug439
@fazerugbrug439 2 жыл бұрын
content is love
@RohitSingh-hc8yi
@RohitSingh-hc8yi Жыл бұрын
Thanks a lot Bhaiya
@laksheybanga8106
@laksheybanga8106 2 жыл бұрын
Bhaiyaaaa i m your big fan ❣️❣️❣️😭... I swear... Thanks alot ❣️
@tjstar390
@tjstar390 2 жыл бұрын
Thanks bhaiya for giving very handy solution of todays Question
@heybiplabb
@heybiplabb 2 жыл бұрын
Present bhaiya ✋
@arijitgarai7077
@arijitgarai7077 14 күн бұрын
There is another simple approach we can solve this problem only with the insertAtTail function by passing the random pointer as an argument. Like this - class Solution { private: void insertAtTail(Node* &head,Node *&tail, int val, Node* random){ Node* newNode = new Node(val); if(head == NULL){ head = newNode; tail = newNode; newNode->random = random; } else{ tail->next = newNode; tail = newNode; newNode->random = random; } } public: Node *copyList(Node *head) { Node* cloneHead = NULL; Node* cloneTail = NULL; Node* temp = head; while(temp != NULL){ insertAtTail(cloneHead, cloneTail, temp->data, temp->random); temp = temp->next; } return cloneHead; } }; Now on gfg it is random no longer arb.
@sandeepn7378
@sandeepn7378 11 ай бұрын
Love babbar bhaiya is op
@rahulrastogi5312
@rahulrastogi5312 2 жыл бұрын
Present bhaiya 🔥🔥❤️
@suvigyabasnotra7378
@suvigyabasnotra7378 2 жыл бұрын
Could understand the 2nd approach but not the code like around 22:18 . In the next ones, can you please explain each line of code back in the diagram on the iPad once you're done coding...? Because it gets harder to visualize so much code mentally and ultimately hard to keep track of what step does what behind the scenes.
@himanshu_1422
@himanshu_1422 2 жыл бұрын
class Solution { private: //insert function for inserting nodes in clone list void insert(Node* &head , Node* &tail , int data){ Node*temp = new Node(data); if(head == NULL){ head = temp; tail = temp; return ; } else{ tail->next = temp; tail = temp; } return; } public: Node* copyRandomList(Node* head) { Node* temp = head; Node* clonehead = NULL , *clonetail = NULL; while(temp!=NULL){ int data = temp->val; insert(clonehead , clonetail , data); temp = temp->next; } map mp; temp = head; Node* p =clonehead; while(temp!=NULL && p!=NULL){ mp[temp] = p; temp = temp->next; p = p->next; } p = clonehead; temp = head; while(p!=NULL && temp!=NULL){ p->random = mp[temp->random]; temp=temp->next; p = p->next; } return clonehead; } };
@winnermindset4803
@winnermindset4803 2 жыл бұрын
Babbar is love ❤️
@udaypratapsingh8923
@udaypratapsingh8923 2 жыл бұрын
love u babbar bhaiyaa
@The_Shubham_Soni
@The_Shubham_Soni Жыл бұрын
Concept++ 🔥🔥
@iutkarshmehta
@iutkarshmehta 2 жыл бұрын
Attendence marked Reach++ Jaise hi motivation halka down hoti h to bhai live prakat ho jate h🙏🏻😂
@sandeepmukherjee8521
@sandeepmukherjee8521 2 жыл бұрын
Present sir attendance please ☺️💕
@bikramghosh845
@bikramghosh845 2 жыл бұрын
you are the best bhaiya..
@manishkhandelwal7660
@manishkhandelwal7660 2 жыл бұрын
Present bhaiya...
@063himanshumishra4
@063himanshumishra4 2 жыл бұрын
Bhaiya mauj kr dii
@priyanshugoyal2539
@priyanshugoyal2539 2 жыл бұрын
Present Bhaiya Ji
@iteself_me
@iteself_me Жыл бұрын
225 ✅completed 👍Liked 06:15
@lelebro3876
@lelebro3876 2 жыл бұрын
Bhaya ab kucch nhi he bas vo bacche dekh rahe he jo serious he pehele jinka khun garam tha ab thanda ho gaya ab jo dekh rahe he vo sab MNC ya Unicorn vale he
@sherebanoburhani8939
@sherebanoburhani8939 2 жыл бұрын
Present bhaiya❤
@i_foodie00
@i_foodie00 Жыл бұрын
day 4 6 oct done
@9852963775aaa
@9852963775aaa 2 жыл бұрын
Thankyou so much bhaiya for this amazing course>>>>>>
@amolnaikwade9004
@amolnaikwade9004 2 жыл бұрын
Consistancy ++, Bhahiya linklist Mai maja ara hai
@anuptewary3016
@anuptewary3016 2 жыл бұрын
Present bhaiya video dekh kar maja aa rahe haa bhaiya a small suggestion from my side is bhaiya please system designeing v kar wa dena Bhaiya as many company is asking now a days
@mriduljain6809
@mriduljain6809 2 жыл бұрын
Thank you Bhaiya 🙏🙏
@tanujasharma1262
@tanujasharma1262 11 ай бұрын
amazing explanation 👏👏
@palaksolanki8037
@palaksolanki8037 2 жыл бұрын
Amazing explanation bhaiya 🥰😄😄😄
@Engineering_Unlocked
@Engineering_Unlocked 4 ай бұрын
thnx bhaiya :) completed on 13/7/24
@hrithikrudra4292
@hrithikrudra4292 2 жыл бұрын
Awesome bhaiya.. ✌️✌️
@akashdeepmaity639
@akashdeepmaity639 Жыл бұрын
Day -> 6✅
Lecture 53: Merge Sort in Linked List [ Theory + Implementation ]
27:49
CodeHelp - by Babbar
Рет қаралды 179 М.
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 22 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Lecture 50: Check Palindrome in Linked List || C++ Placement Course
22:38
CodeHelp - by Babbar
Рет қаралды 151 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 835 М.
Lecture40: Rat in a Maze Problem || C++ Placement Course 2022
37:31
CodeHelp - by Babbar
Рет қаралды 215 М.
DSA & ₹1.2 Crore Per Annum Jobs - The Truth? (No Offence)
12:22
CodeWithHarry
Рет қаралды 714 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 124 М.
Lecture 49: Merge 2 Sorted Linked Lists || Sort 0s, 1s and 2s in Linked List
58:44
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 22 МЛН