L9. Reverse a LinkedList | Iterative and Recursive

  Рет қаралды 180,768

take U forward

take U forward

Күн бұрын

Пікірлер: 177
@pratulyapratap9329
@pratulyapratap9329 Жыл бұрын
U r not only teaching linkedlist u r teaching values to give back to this community.. Thankyou Striver
@_SahilShah
@_SahilShah 5 ай бұрын
00:10 Iterative Approach 14:39 Recursive Approach very nice explanation Striver! Understood!
@tanisha999-e2w
@tanisha999-e2w Жыл бұрын
Hands down, the best explanation on KZbin!
@samreenimam8608
@samreenimam8608 8 ай бұрын
I was confused until I watched the dry run of recursion... Thanks for having Striver!..
@user-wp7kd9dv6i
@user-wp7kd9dv6i 4 ай бұрын
same
@aryanpinto5105
@aryanpinto5105 Жыл бұрын
Was a bit confused regarding recursive approach of this problem for a while. Your explanation just cleared out all of it. Great video!!❤💯
@abid3801
@abid3801 11 ай бұрын
Awesome man. The way you tried to portray the recursive one is actually over the moon..
@monikarawat5125
@monikarawat5125 Ай бұрын
Right actually over the moon 🌝 sir 🙏🏻🙏🏻taught us the beauty of recursion beautifully and factually ❤😇
@durgeshjadhav01
@durgeshjadhav01 9 ай бұрын
Logic are crystal clear with your perfection in explanation , i don't even need to look code .
@AmanSharma-xy1qm
@AmanSharma-xy1qm Жыл бұрын
All the video lectures and the articles helped me a lot to gain confidence in DSA and will be helping me in the interviews. Thank you Striver bhaiya for bringing such amazing content for free.
@1handclaps
@1handclaps 9 ай бұрын
If you are a beginner or even an intermediate this is the best playlist to follow for DSA
@sanchitsanyam7359
@sanchitsanyam7359 8 ай бұрын
recursive approach of soving linked list is awesome non of any youtuber has explained it such fantastically
@hardikkumarsingh
@hardikkumarsingh 11 ай бұрын
Exceptional explanation !!! I've never intuitively understood recursive version of reversing a LinkedList, but this video helped me understand that too so easily🙇🙇
@gauravmishra8782
@gauravmishra8782 11 ай бұрын
The dry run part is genius!! very nice explanation.
@raghavgarg-oo6mx
@raghavgarg-oo6mx 10 ай бұрын
explanation of the recursive approach was just exceptional . thankyouu striver
@surayahappy120
@surayahappy120 Жыл бұрын
so beautiful so elegant just looking like a wow
@AADITYASINGH-b2z
@AADITYASINGH-b2z 3 ай бұрын
Kudos from the entire community for such beautiful explanation.
@ritikshandilya7075
@ritikshandilya7075 8 ай бұрын
Recursion approach is just LIT , bhai kamal kr diya striver bhai
@bhusanrath9698
@bhusanrath9698 7 ай бұрын
0:00 -4:58 = Brute Force (Using Stack) 5:00 - 14:45 = Iterative 14:50 = Recursive
@dhruvsovasaria
@dhruvsovasaria 2 ай бұрын
thankyou , tried to understand the recursive approach from everywhere before this since last night , finally understood
@Salman_Patel_07
@Salman_Patel_07 4 ай бұрын
Crystal clear !!! Thanks for explaining the recursion topic soo beautifully and making it easier to understand. ❤
@darshitsingh4378
@darshitsingh4378 3 ай бұрын
BEST VIDEO ON KZbin SEEN ALL
@endlesslearning26
@endlesslearning26 4 ай бұрын
The recursion code is always a delight to understand , coz you think that how could be solved soo elegantly
@MrRon-jx9vx
@MrRon-jx9vx 8 ай бұрын
Great explanation!!! The best i've ever seen on recursion !
@adityamukherjee2207
@adityamukherjee2207 Ай бұрын
bhaiyya thank u so much for this explanation tomorrow i have ds end sem exam and still this video helped me a lot . thank u so much.
@harshilpatel3205
@harshilpatel3205 10 ай бұрын
Amazing explanation at recursive approach thank you striver for this amazing course😊🎉
@surge3.14
@surge3.14 7 ай бұрын
Your DryRun thing in these recursion approaches is amazing
@ddevarapaga5134
@ddevarapaga5134 5 ай бұрын
Brooo u are crazyyyy that dry run is the best i have seen thank you understood
@ujjwalsingh6889
@ujjwalsingh6889 9 ай бұрын
Finally I understood this recursive concept.........Nice Explanation👍👍
@honeyjot8709
@honeyjot8709 10 ай бұрын
Loved the explanation for recursive solution, especially the DRY RUN
@adveshdarvekar7733
@adveshdarvekar7733 3 ай бұрын
Thank you for putting so much hardwork!
@Rieshu-l9i
@Rieshu-l9i 10 ай бұрын
Amazingly explained, #Striver rocks, gold bless you & all
@FifthArima
@FifthArima 7 ай бұрын
The way he explains sounds like Arnab Goswami highlighting the news ! 😂
@manasbhatia1191
@manasbhatia1191 6 ай бұрын
Is it me or anyone else also thinks that things have been a little tougher from Linked List
@vibhavsharma2724
@vibhavsharma2724 6 ай бұрын
I think it's you only.
@aspirant500days7
@aspirant500days7 6 ай бұрын
No man. I've given up on Linked last multiple times to reach this far (not even half).
@vedikamishra009
@vedikamishra009 Ай бұрын
@@vibhavsharma2724 🙂
@_thingsthatmatter
@_thingsthatmatter 6 ай бұрын
i love youuuu u r thee besttttt teacherrrrrrrr EVERRRRRRRRRRRRR
@stith_pragya
@stith_pragya 11 ай бұрын
UNDERSTOOD, Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@rahuldwivedi4758
@rahuldwivedi4758 11 ай бұрын
Even more concise: function reverseList(head, prev=null){ if(head === null) return prev; const next = head.next; head.next = prev; return reverseList(head.next, head); }
@hiteshsharma9192
@hiteshsharma9192 11 ай бұрын
Broo your way of explaining is awesom👍👍
@swagatrout3075
@swagatrout3075 10 ай бұрын
thank you man tanks for clarifying the recursion from scratch
@cjonyoutube3011
@cjonyoutube3011 Ай бұрын
Beautifully explained
@amitarya4894
@amitarya4894 5 ай бұрын
Awesome and hats off 🙏🙏 thank you so much Striver.
@arhamansari1312
@arhamansari1312 2 ай бұрын
Excellent work. Thank you so much!!!
@ankitghanshala7382
@ankitghanshala7382 10 күн бұрын
head->next in recursive call is the head for base condition..so the function returns last node after head->next recursive call for the second last node is called.
@__.redcode._
@__.redcode._ Ай бұрын
t1 = head; // Initialize t1 to point to the head t3 = NULL; // Initialize t3 as NULL (previous pointer) t4 = t1->next; // Initialize t4 to the second node in the list t2 = NULL; // Initialize t2 as NULL int c = 1; // Start with c = 1 while (t4 != NULL) { if (c == 1) { c--; // Decrement c t2 = t1; // Set t2 to point to t1 t4 = t2->next; // Move t4 to the next node t1->next = t3; // Reverse the link for t1 t3 = t2; // Move t3 forward to t2 } else { c++; // Increment c t3 = t4->next; // Store the next node of t4 in t3 t1 = t4; // Move t1 forward to t4 t4->next = t2; // Reverse the link for t4 t2 = t1; // Move t2 forward to t1 t4 = t3; // Move t4 forward to the next node } } head = t1; // Update head to the new first node after reversal this might be a complex alternative , was for me when i deduced for the first time ;) and little bit of confusion removal by GPT my friend in need using swapping the pointers and accessing their respected node's next for reversing the linked list
@Ammmmmmmman
@Ammmmmmmman 11 ай бұрын
Dry run part was actually brilliant
@highfiveseries2244
@highfiveseries2244 18 күн бұрын
12/22/2024 _Good Explanation Striver bhaiya ❤
@sibiranganath
@sibiranganath 8 ай бұрын
Recursive approach: 14:50
@adharapuramnavaneeth9925
@adharapuramnavaneeth9925 Жыл бұрын
greatest video superb sir !!
@swathigp3818
@swathigp3818 6 ай бұрын
I was very confused with this recursive method, how does it reverse. It is super clear after watching your video !
@PeterParker-ee6ep
@PeterParker-ee6ep 4 ай бұрын
dry run makes the explanation clear.
@mohitparmar01
@mohitparmar01 5 ай бұрын
best explanation ever!
@PCCOERCoder
@PCCOERCoder Ай бұрын
Lecture successfully completed on 27/11/2024 🔥🔥
@nithins6273
@nithins6273 Ай бұрын
did u complete whole linked list playlist?
@AbhishekKumar-cd4gg
@AbhishekKumar-cd4gg 6 ай бұрын
understood , best part was dry run of recursive code
@aavashkuikel1341
@aavashkuikel1341 8 ай бұрын
15:00 Recursion Starts
@prad2003
@prad2003 7 ай бұрын
best explanation ever
@prathambhatia3040
@prathambhatia3040 5 ай бұрын
Thanks for that dry run approach
@ojasviagrawal3180
@ojasviagrawal3180 Жыл бұрын
excellent explanation was just fabbb
@kalpking...4496
@kalpking...4496 10 ай бұрын
understood very much thank you sir
@girirajsingh4467
@girirajsingh4467 6 ай бұрын
you are a genius
@AvijitGhosh-o1r
@AvijitGhosh-o1r 4 ай бұрын
Very well explained. Thanks
@HemangSinghal-op5ep
@HemangSinghal-op5ep 4 ай бұрын
Awesome Explanation!
@jeanishverma6898
@jeanishverma6898 10 ай бұрын
In iterative method use this , if you get null exception: Node temp = head; Node p = null; While(temp!=null){ Node curr = temp.next; temp.next=p; p=temp; temp=curr; } return p;
@saitehith6647
@saitehith6647 9 ай бұрын
Just Brilliant ❤
@knowthrvdo
@knowthrvdo 10 ай бұрын
NICE LECTURE AND PLZ UPLOAD REMAINING LECTURES OF A TO Z SDA SHEET PLZ THEY ARE VERY HELPFULL FOR US
@lakshayverma6557
@lakshayverma6557 5 ай бұрын
dry run was awesome
@prathameshjadhav2942
@prathameshjadhav2942 Жыл бұрын
Awesome teaching
@ManasNandMohan
@ManasNandMohan Жыл бұрын
So Beautiful , So elegant just looking like a WoW
@dhanushkiran-k3j
@dhanushkiran-k3j Жыл бұрын
Best video explanation
@kumarnishantnitallahabad160
@kumarnishantnitallahabad160 7 ай бұрын
Wow great explanation
@adebisisheriff159
@adebisisheriff159 11 ай бұрын
Simply the best!!!
@rishu4800
@rishu4800 Жыл бұрын
Amazing explanation
@pavanKumar-hm7on
@pavanKumar-hm7on 11 ай бұрын
you are our god . thank you soo much
@hashcodez757
@hashcodez757 6 ай бұрын
9:45 Take U Forward
@diptamoy12
@diptamoy12 Жыл бұрын
bhaiyaa app great ho❤❤❤❤
@yeakub_sadlil
@yeakub_sadlil Ай бұрын
Understood 💥 Done and Dusted 💯 🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺 🔺
@gauravbanerjee2898
@gauravbanerjee2898 11 ай бұрын
Understood Thanks a lot ❣❣
@nuraynasirzade
@nuraynasirzade 8 ай бұрын
Striver i'm solving A2Z course and i'm at the strings but there is no video explanation for them. i searched videos on youtube but one explains in detail and clear like you. So can you PLEASE make videos on that topic(i will wait). Thank You
@romanreigns4235
@romanreigns4235 6 ай бұрын
Same bro
@banothutharun2743
@banothutharun2743 10 ай бұрын
what a man 👏👏
@AshwaniKumar-ew1cn
@AshwaniKumar-ew1cn Ай бұрын
Superb!
@YourCodeVerse
@YourCodeVerse 11 ай бұрын
Understood✅🔥🔥
@pankajsunal9819
@pankajsunal9819 10 ай бұрын
thanks for this explanation
@KeerthiTummala296
@KeerthiTummala296 2 ай бұрын
🥳💯 percent effective
@annapureddyravi4054
@annapureddyravi4054 7 ай бұрын
Bro can you push the code ..The way you explain is very interesting to watch and learn the concepts.
@manga_mania.
@manga_mania. Жыл бұрын
Thank you striver😃😃
@shwetachoudhary9003
@shwetachoudhary9003 Ай бұрын
got it soo well❤
@Arnavfellasleep
@Arnavfellasleep 9 ай бұрын
Understood Will comeback after a month and report where I am.
@codeman3828
@codeman3828 11 ай бұрын
Great video
@s.saranya2486
@s.saranya2486 Жыл бұрын
the BEST💯
@amanpratapsingh1981
@amanpratapsingh1981 Жыл бұрын
Hey, I find your videos very valuable interms of understanding things, but just not able to find the links in the description whatever you mention in the video, not sure why. Thanks Striver for these videos.
@sarthakkk8628
@sarthakkk8628 Жыл бұрын
you can find the links on his website whose link is in the description.
@instinct1098
@instinct1098 7 ай бұрын
Recursive is damnn good!!
@snehashisratna9074
@snehashisratna9074 Жыл бұрын
big fan bhai luv you bhai
@ABISHEK-r7k
@ABISHEK-r7k 11 ай бұрын
UNDERSTOOD SIR
@ankithazra2005
@ankithazra2005 6 ай бұрын
you are god
@ArpanChakraborty-do6yz
@ArpanChakraborty-do6yz 10 ай бұрын
Understand ❤❤
@khalasianiket816
@khalasianiket816 6 ай бұрын
understood ❤
@SomalinBagarty
@SomalinBagarty 7 ай бұрын
Amazing !!!
@karthik-varma-1579
@karthik-varma-1579 5 ай бұрын
00:10 Iterative Approach 14:39 Recursive Approach I Have Seen Your Content Is Been Copying By Other Edtech compaines and They are Following Same Pattern in which you are Saying Maybe You Do A Copyright Strike
@whitedevil2869
@whitedevil2869 5 ай бұрын
In recursive way m..I wrote the same code given above ..... Stack overflow error aa raha hain ....give me soln
@rockstarCoolz
@rockstarCoolz 7 ай бұрын
Thanks 🙏 sir
@adithyahegdekota2586
@adithyahegdekota2586 5 ай бұрын
14:!4 The death stare
@Learnprogramming-q7f
@Learnprogramming-q7f 10 ай бұрын
Thank you bhaiya
@surayahappy120
@surayahappy120 Жыл бұрын
best best best best ...................................................................
L10. Check if a LinkedList is Palindrome or Not | Multiple Approaches
20:02
L8. Remove Nth Node from the end of the LinkedList | Multiple Approaches
16:23
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,2 МЛН
Kadane's Algorithm | Maximum Subarray Sum | Finding and Printing
20:09
take U forward
Рет қаралды 535 М.
Chemical equations and Reaction || class 10th science  || board important
37:28
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 767 М.
L14. Detect a loop or cycle in LinkedList | With proof and Intuition
20:26
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 499 М.
Recursion in Programming - Full Course
1:51:36
freeCodeCamp.org
Рет қаралды 977 М.
L21. Reverse Nodes in K Group Size of LinkedList
24:31
take U forward
Рет қаралды 112 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 16 М.
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН