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
I was confused until I watched the dry run of recursion... Thanks for having Striver!..
U r not only teaching linkedlist u r teaching values to give back to this community.. Thankyou Striver
Hands down, the best explanation on KZread!
Was a bit confused regarding recursive approach of this problem for a while. Your explanation just cleared out all of it. Great video!!❤💯
so beautiful so elegant just looking like a wow
recursive approach of soving linked list is awesome non of any youtuber has explained it such fantastically
Awesome man. The way you tried to portray the recursive one is actually over the moon..
Logic are crystal clear with your perfection in explanation , i don't even need to look code .
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.
Great explanation!!! The best i've ever seen on recursion !
The dry run part is genius!! very nice explanation.
Thanks for that dry run approach
Exceptional explanation !!! I've never intuitively understood recursive version of reversing a LinkedList, but this video helped me understand that too so easily🙇🙇
explanation of the recursive approach was just exceptional . thankyouu striver
Recursion approach is just LIT , bhai kamal kr diya striver bhai
00:10 Iterative Approach 14:39 Recursive Approach very nice explanation Striver! Understood!
If you are a beginner or even an intermediate this is the best playlist to follow for DSA
Brooo u are crazyyyy that dry run is the best i have seen thank you understood
Your DryRun thing in these recursion approaches is amazing
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;
thank you man tanks for clarifying the recursion from scratch
Loved the explanation for recursive solution, especially the DRY RUN
Broo your way of explaining is awesom👍👍
Finally I understood this recursive concept.........Nice Explanation👍👍
Amazing explanation at recursive approach thank you striver for this amazing course😊🎉
Amazingly explained, #Striver rocks, gold bless you & all
UNDERSTOOD, Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
greatest video superb sir !!
best explanation ever!
excellent explanation was just fabbb
i love youuuu u r thee besttttt teacherrrrrrrr EVERRRRRRRRRRRRR
you are a genius
Best video explanation
Simply the best!!!
Just Brilliant ❤
Amazing explanation
Thank you striver😃😃
big fan bhai luv you bhai
understood , best part was dry run of recursive code
Dry run part was actually brilliant
understood very much thank you sir
bhaiyaa app great ho❤❤❤❤
best explanation ever
Understood Thanks a lot ❣❣
Awesome teaching
the BEST💯
Wow great explanation
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.
thanks for this explanation
Amazing !!!
Great video
I was very confused with this recursive method, how does it reverse. It is super clear after watching your video !
what a man 👏👏
Thank you bhaiya
dry run was awesome
Understood✅🔥🔥
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); }
The way he explains sounds like Arnab Goswami highlighting the news ! 😂
UNDERSTOOD SIR
Understood
NICE LECTURE AND PLZ UPLOAD REMAINING LECTURES OF A TO Z SDA SHEET PLZ THEY ARE VERY HELPFULL FOR US
Thanks ❤
you are our god . thank you soo much
Thanks A lot
Understand ❤❤
understood ❤
So Beautiful , So elegant just looking like a WoW
Thanks
Understood!
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
Ай бұрын
Same bro
Thanks 🙏 sir
Bro can you push the code ..The way you explain is very interesting to watch and learn the concepts.
understood!!!
Recursive is damnn good!!
Understooood
you are god
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
6 ай бұрын
you can find the links on his website whose link is in the description.
Understood Will comeback after a month and report where I am.
understood
best best best best ...................................................................
0:00 -4:58 = Brute Force (Using Stack) 5:00 - 14:45 = Iterative 14:50 = Recursive
14:!4 The death stare
👍👍
understand
9:45 Take U Forward
❤
Fab
🐐
15:00 Recursion Starts
Recursive approach: 14:50
bro is recording me aap bahut hi jyda tired dikh rhe ho.. aapko ek acche neend ki jrurat hai..
@takeUforward
8 ай бұрын
Pdhai kar lo, meko dekh kr kya hoga 🤦🏼♂️
@aasimahsan6167
8 ай бұрын
@@takeUforward 😂
@vatsaljain662
8 ай бұрын
@@takeUforward Thank You for your Hardwork Bhaiya
@AbhishekKumar-nz9dn
7 ай бұрын
@@takeUforward 😂jainwin
why can't we just change the head rather than using temporary node and then return the head;
20:04 check it out🤣
So sad to see only 1k likes
god
done dana dan done
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 ; }
US
time stamps please
Is it me or anyone else also thinks that things have been a little tougher from Linked List
@vibhavsharma2724
Ай бұрын
I think it's you only.
@aspirant500days7
Ай бұрын
No man. I've given up on Linked last multiple times to reach this far (not even half).