L9. Reverse a LinkedList | Iterative and Recursive

Problem Link: tinyurl.com/2ajt9262
Entire LL Sheet: takeuforward.org/linked-list/...
Check our A2Z DSA Course: takeuforward.org/strivers-a2z...
Please do give us a like, and subscribe to us if you are new to our channel.
Do follow us on our socials: linktr.ee/takeuforward

Пікірлер: 134

  • @samreenimam8608
    @samreenimam86082 ай бұрын

    I was confused until I watched the dry run of recursion... Thanks for having Striver!..

  • @pratulyapratap9329
    @pratulyapratap93298 ай бұрын

    U r not only teaching linkedlist u r teaching values to give back to this community.. Thankyou Striver

  • @tanishagupta9997
    @tanishagupta99978 ай бұрын

    Hands down, the best explanation on KZread!

  • @aryanpinto5105
    @aryanpinto51057 ай бұрын

    Was a bit confused regarding recursive approach of this problem for a while. Your explanation just cleared out all of it. Great video!!❤💯

  • @surayahappy120
    @surayahappy1208 ай бұрын

    so beautiful so elegant just looking like a wow

  • @sanchitsanyam7359
    @sanchitsanyam73592 ай бұрын

    recursive approach of soving linked list is awesome non of any youtuber has explained it such fantastically

  • @abid3801
    @abid38015 ай бұрын

    Awesome man. The way you tried to portray the recursive one is actually over the moon..

  • @durgeshjadhav01
    @durgeshjadhav014 ай бұрын

    Logic are crystal clear with your perfection in explanation , i don't even need to look code .

  • @AmanSharma-xy1qm
    @AmanSharma-xy1qm7 ай бұрын

    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.

  • @MrRon-jx9vx
    @MrRon-jx9vx3 ай бұрын

    Great explanation!!! The best i've ever seen on recursion !

  • @gauravmishra8782
    @gauravmishra87826 ай бұрын

    The dry run part is genius!! very nice explanation.

  • @prathambhatia3040
    @prathambhatia30402 сағат бұрын

    Thanks for that dry run approach

  • @hardikkumarsingh
    @hardikkumarsingh6 ай бұрын

    Exceptional explanation !!! I've never intuitively understood recursive version of reversing a LinkedList, but this video helped me understand that too so easily🙇🙇

  • @raghavgarg-oo6mx
    @raghavgarg-oo6mx5 ай бұрын

    explanation of the recursive approach was just exceptional . thankyouu striver

  • @ritikshandilya7075
    @ritikshandilya70753 ай бұрын

    Recursion approach is just LIT , bhai kamal kr diya striver bhai

  • @_SahilShah
    @_SahilShah7 күн бұрын

    00:10 Iterative Approach 14:39 Recursive Approach very nice explanation Striver! Understood!

  • @1handclaps
    @1handclaps4 ай бұрын

    If you are a beginner or even an intermediate this is the best playlist to follow for DSA

  • @ddevarapaga5134
    @ddevarapaga513412 күн бұрын

    Brooo u are crazyyyy that dry run is the best i have seen thank you understood

  • @surge3.14
    @surge3.14Ай бұрын

    Your DryRun thing in these recursion approaches is amazing

  • @jeanishverma6898
    @jeanishverma68985 ай бұрын

    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;

  • @swagatrout3075
    @swagatrout30755 ай бұрын

    thank you man tanks for clarifying the recursion from scratch

  • @honeyjot8709
    @honeyjot87095 ай бұрын

    Loved the explanation for recursive solution, especially the DRY RUN

  • @hiteshsharma9192
    @hiteshsharma91926 ай бұрын

    Broo your way of explaining is awesom👍👍

  • @ujjwalsingh6889
    @ujjwalsingh68893 ай бұрын

    Finally I understood this recursive concept.........Nice Explanation👍👍

  • @harshilpatel3205
    @harshilpatel32054 ай бұрын

    Amazing explanation at recursive approach thank you striver for this amazing course😊🎉

  • @user-bc6ss6gp3z
    @user-bc6ss6gp3z5 ай бұрын

    Amazingly explained, #Striver rocks, gold bless you & all

  • @stith_pragya
    @stith_pragya6 ай бұрын

    UNDERSTOOD, Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @adharapuramnavaneeth9925
    @adharapuramnavaneeth99256 ай бұрын

    greatest video superb sir !!

  • @mohitparmar01
    @mohitparmar016 күн бұрын

    best explanation ever!

  • @ojasviagrawal3180
    @ojasviagrawal31807 ай бұрын

    excellent explanation was just fabbb

  • @_thingsthatmatter
    @_thingsthatmatterАй бұрын

    i love youuuu u r thee besttttt teacherrrrrrrr EVERRRRRRRRRRRRR

  • @girirajsingh4467
    @girirajsingh4467Ай бұрын

    you are a genius

  • @user-pc5gs7ru5o
    @user-pc5gs7ru5o8 ай бұрын

    Best video explanation

  • @adebisisheriff159
    @adebisisheriff1595 ай бұрын

    Simply the best!!!

  • @saitehith6647
    @saitehith66474 ай бұрын

    Just Brilliant ❤

  • @rishu4800
    @rishu48006 ай бұрын

    Amazing explanation

  • @manga_mania.
    @manga_mania.8 ай бұрын

    Thank you striver😃😃

  • @snehashisratna9074
    @snehashisratna90747 ай бұрын

    big fan bhai luv you bhai

  • @AbhishekKumar-cd4gg
    @AbhishekKumar-cd4ggАй бұрын

    understood , best part was dry run of recursive code

  • @Ammmmmmmman
    @Ammmmmmmman5 ай бұрын

    Dry run part was actually brilliant

  • @kalpking...4496
    @kalpking...44965 ай бұрын

    understood very much thank you sir

  • @diptamo
    @diptamo7 ай бұрын

    bhaiyaa app great ho❤❤❤❤

  • @pradipthij3552
    @pradipthij3552Ай бұрын

    best explanation ever

  • @gauravbanerjee2898
    @gauravbanerjee28986 ай бұрын

    Understood Thanks a lot ❣❣

  • @prathameshjadhav2942
    @prathameshjadhav29426 ай бұрын

    Awesome teaching

  • @s.saranya2486
    @s.saranya24867 ай бұрын

    the BEST💯

  • @kumarnishantnitallahabad160
    @kumarnishantnitallahabad1602 ай бұрын

    Wow great explanation

  • @thenarmada007
    @thenarmada0072 ай бұрын

    Man, I must say, wonderful video. You explained the recursive solution so well 🤌. I have a much deeper understanding of how to deal with recursion in general because of you. Usually, in recursion people skip through the nitty-gritty details like the current state of the variables involved and the structure of the linked list in intermediate steps, but you have gone through all of it, so thanks! Hope you get more views and subscribers.

  • @pankajsunal9819
    @pankajsunal98195 ай бұрын

    thanks for this explanation

  • @justvibin6601
    @justvibin66012 ай бұрын

    Amazing !!!

  • @codeman3828
    @codeman38286 ай бұрын

    Great video

  • @swathigp3818
    @swathigp3818Ай бұрын

    I was very confused with this recursive method, how does it reverse. It is super clear after watching your video !

  • @banothutharun2743
    @banothutharun27435 ай бұрын

    what a man 👏👏

  • @user-tk2vg5jt3l
    @user-tk2vg5jt3l5 ай бұрын

    Thank you bhaiya

  • @lakshayverma6557
    @lakshayverma655720 күн бұрын

    dry run was awesome

  • @YourCodeVerse
    @YourCodeVerse6 ай бұрын

    Understood✅🔥🔥

  • @rahuldwivedi4758
    @rahuldwivedi47586 ай бұрын

    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); }

  • @FifthArima
    @FifthArima2 ай бұрын

    The way he explains sounds like Arnab Goswami highlighting the news ! 😂

  • @user-dv1ts9db8i
    @user-dv1ts9db8i6 ай бұрын

    UNDERSTOOD SIR

  • @MayankisG
    @MayankisGКүн бұрын

    Understood

  • @knowthrvdo
    @knowthrvdo5 ай бұрын

    NICE LECTURE AND PLZ UPLOAD REMAINING LECTURES OF A TO Z SDA SHEET PLZ THEY ARE VERY HELPFULL FOR US

  • @Ashutoshkumar-jx9wk
    @Ashutoshkumar-jx9wk7 ай бұрын

    Thanks ❤

  • @pavanKumar-hm7on
    @pavanKumar-hm7on6 ай бұрын

    you are our god . thank you soo much

  • @user-or5oz1pk2x
    @user-or5oz1pk2x3 ай бұрын

    Thanks A lot

  • @ArpanChakraborty-do6yz
    @ArpanChakraborty-do6yz4 ай бұрын

    Understand ❤❤

  • @khalasianiket816
    @khalasianiket81629 күн бұрын

    understood ❤

  • @ManasNandMohan
    @ManasNandMohan7 ай бұрын

    So Beautiful , So elegant just looking like a WoW

  • @subee128
    @subee1288 ай бұрын

    Thanks

  • @RituSingh-ne1mk
    @RituSingh-ne1mk7 ай бұрын

    Understood!

  • @nuraynasirzade
    @nuraynasirzade3 ай бұрын

    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

    Ай бұрын

    Same bro

  • @rockstarCoolz
    @rockstarCoolzАй бұрын

    Thanks 🙏 sir

  • @annapureddyravi4054
    @annapureddyravi40542 ай бұрын

    Bro can you push the code ..The way you explain is very interesting to watch and learn the concepts.

  • @AnuragParoha-ck5ds
    @AnuragParoha-ck5ds3 ай бұрын

    understood!!!

  • @instinct1098
    @instinct10982 ай бұрын

    Recursive is damnn good!!

  • @NARUTOUZUMAKI-bk4nx
    @NARUTOUZUMAKI-bk4nx6 ай бұрын

    Understooood

  • @ankithazra2005
    @ankithazra2005Ай бұрын

    you are god

  • @amanpratapsingh1981
    @amanpratapsingh19817 ай бұрын

    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

    6 ай бұрын

    you can find the links on his website whose link is in the description.

  • @Arnavfellasleep
    @Arnavfellasleep3 ай бұрын

    Understood Will comeback after a month and report where I am.

  • @tanaygada914
    @tanaygada9147 ай бұрын

    understood

  • @surayahappy120
    @surayahappy1208 ай бұрын

    best best best best ...................................................................

  • @bhusanrath9698
    @bhusanrath96982 ай бұрын

    0:00 -4:58 = Brute Force (Using Stack) 5:00 - 14:45 = Iterative 14:50 = Recursive

  • @adithyahegdekota2586
    @adithyahegdekota258616 күн бұрын

    14:!4 The death stare

  • @SunnyKumar-dw9ze
    @SunnyKumar-dw9ze8 ай бұрын

    👍👍

  • @CoderGrow1
    @CoderGrow14 ай бұрын

    understand

  • @hashcodez757
    @hashcodez75728 күн бұрын

    9:45 Take U Forward

  • @anupkhismatrao9280
    @anupkhismatrao92805 ай бұрын

  • @shreyanshvijoy4786
    @shreyanshvijoy47865 ай бұрын

    Fab

  • @codingalley6229
    @codingalley622928 күн бұрын

    🐐

  • @aavashkuikel1341
    @aavashkuikel13413 ай бұрын

    15:00 Recursion Starts

  • @sibiranganath
    @sibiranganath3 ай бұрын

    Recursive approach: 14:50

  • @ashutosh61290
    @ashutosh612908 ай бұрын

    bro is recording me aap bahut hi jyda tired dikh rhe ho.. aapko ek acche neend ki jrurat hai..

  • @takeUforward

    @takeUforward

    8 ай бұрын

    Pdhai kar lo, meko dekh kr kya hoga 🤦🏼‍♂️

  • @aasimahsan6167

    @aasimahsan6167

    8 ай бұрын

    @@takeUforward 😂

  • @vatsaljain662

    @vatsaljain662

    8 ай бұрын

    @@takeUforward Thank You for your Hardwork Bhaiya

  • @AbhishekKumar-nz9dn

    @AbhishekKumar-nz9dn

    7 ай бұрын

    @@takeUforward 😂jainwin

  • @GADDAMSAHITHYAKUMARRAJA
    @GADDAMSAHITHYAKUMARRAJAАй бұрын

    why can't we just change the head rather than using temporary node and then return the head;

  • @GGARIN.C.R
    @GGARIN.C.R24 күн бұрын

    20:04 check it out🤣

  • @utpalkant6354
    @utpalkant63545 ай бұрын

    So sad to see only 1k likes

  • @user-gk4zy6bk7l
    @user-gk4zy6bk7l2 ай бұрын

    god

  • @jhanavikumari274
    @jhanavikumari2742 ай бұрын

    done dana dan done

  • @Anime-ub7vs
    @Anime-ub7vs6 ай бұрын

    recursive solution of linked list ListNode* reverseList(ListNode* head) { if(head == NULL) return NULL ; if(head->next == NULL ) return head ; ListNode * newHead = reverseList(head->next); head->next->next = head ; head->next = NULL; return newHead ; }

  • @iamnoob7593
    @iamnoob75934 ай бұрын

    US

  • @kushalkollu8628
    @kushalkollu86282 ай бұрын

    time stamps please

  • @manasbhatia1191
    @manasbhatia1191Ай бұрын

    Is it me or anyone else also thinks that things have been a little tougher from Linked List

  • @vibhavsharma2724

    @vibhavsharma2724

    Ай бұрын

    I think it's you only.

  • @aspirant500days7

    @aspirant500days7

    Ай бұрын

    No man. I've given up on Linked last multiple times to reach this far (not even half).