Reverse a Linked List Recursively

preview_player
Показать описание
Problem:
Reverse a Linked List Recursively.

Solution:
Start with node curr as head.
1. If curr is null, return.
2. If curr’s next element is null, this means it is
the last node, so make this as head because the
last node will be the head of reversed list. Return.
3. Recursively traverse the list.

Рекомендации по теме
Комментарии
Автор

The only video online explained the recursive of linked list so clear, thank you

shanluxue
Автор

Best video available on youtube for recursive reversal of linked list.

IBRAHIMKHAN-bujc
Автор

current.next.next is the node pointer that's one in front of your current node. When you say current.next.next = current, this is the "reversing" part. When you say current.next = null, this is deleting the old reference to the list going the other way. Thank you for posting this, I understand it now!

FreeMayaTutorials
Автор

6 Years later and this tutorial is the best I have ever seen for this problem

xTraase
Автор

The fact that other tutorials don't use animation and they are better rated is BS. thank you

lily_h-mj
Автор

visual animation really helps a lot to understand the algorithms. Thanks for the videos

Saravanakumar-rnfw
Автор

bro you deserve 1M subscribers, I was struggling with reversing a linked list and you made it understandable for me in less than 5 mins

lokeshbm
Автор

Thanks a lot!!I saw lots of videos for this recursive method but nothing helped me understand.This is the only video which made the concept soo clear!

gitikarath
Автор

This channel was way ahead of its time ❤️❤️

MP-wqxe
Автор

Beautiful explanation. I understood in 4 mins what i was not able to understand in 4 hours!

sanchitjain
Автор

Finally a video which actually show how the algorithm works....👍🏻 Excellent video

aakanksha
Автор

Really a only video which explains reverse of linked list recursively best way

hrushikeshwasamkar
Автор

Your animation/visualization making things to understand easily. Thanks to IDerserve, the first technical channel I subscribed which is worthy to gain insight into algorithms.

anonymousfriend
Автор

I had watched many videos and this is the only one I clearly understood. Thank You!

manideep
Автор

Really great video! I'm still missing why we would set curr.next.next = curr. I can't figure out why doing curr.next = curr won't work

rochelleroberts
Автор

Thanks so much guys, great explanation!!! Much support from an Indian brother

sambhavaggarwal
Автор

This was awesome! I finally understood what `curr.next.next = curr` means! thank you for posting this

rrsonia
Автор

Thank you very much. After wasting a lot of time on YouTube, I found this one. 🙏

shivamraj-utef
Автор

I was looking for this kind of animated explanation, very well explained. Great work @IDeserve

jaysaxena
Автор

Thank you soooo much, you are the best of explaining reversing a link list recursivly.
I struggle over a day to understand this recursive method, though i could do it iterativly.
i went over many you tube videos, some documentation, but finally i luckily stumbled upon your channel, I understood it completly.
Joy of my life is trying to understand hard concepts.You truley brought me joy., and knowledge.
Thank you so much GREAT SIR, you are truely blessed.keep up the good work.I am subscribed.

chamnil