TECH DOSE, do you plan to add playlists according to the Leetcode's difficulty level? That would increase views for you and help the audience to watch the whole list of problems that they target. Thanks.
Your final commentary is a lot confusing and doesn’t explain why you return left or right when the other is null. It is because when right is null you found both modes on left so the left node down is LCA and vice-versa
This makes unnecessary work. Imagine that both nodes are on the left, your code still explores the entire right subtree, when it could already stop the search there. You can keep state locally in the class or use an helper method with an additional settable field to avoid this. On the other hand, the fact that you don't continue the search down the subtrees when root matches one of the nodes, reduces the search space, so depending on the case, it might end up being better or worse.
You're an excellent teacher, I've learned so much from your videos, you explain recursion beautifully, Thank you!
I don't comment very often on videos, but yours really helped me. Thank you so much
Welcome :)
you explaied node tree recursion like a class 8th maths problem. Bro you're a genius.
Happy teacher's day Sir...
Awesome explanation, I had trouble understanding this earlier but now i get it
Great!
Thank you so much, very clear and helpful video!
welcome :)
Nice one. Please do Leetcode 621 - Task Scheduler.
Sure 👍🏼
@TECH DOSE, Yes! Please do 621! Thank you!
Best expalnation ever
great explanation theyw ay you explain the question by all possibe senario is superb
Man, you're awesome as always!
Thanks 😊
Thanks
Welcome :)
Great explanation.
Thanks :)
Great stuff! 👍🏻
Thanks ☺️
Very nice explanation. Thank you
Thank you!
TECH DOSE, do you plan to add playlists according to the Leetcode's difficulty level? That would increase views for you and help the audience to watch the whole list of problems that they target. Thanks.
Yes I will 👍🏼
@@techdose4u thanks, looking forward to it!
👌🏼
THIS IS AWESOME.
Nicely explained !!
Thanks
Thanks brother
Very smart! Thanks
amazing content
Thanks 😊
What is the editor name?
Very much excited
😀
Thanks a lot sir :)
Excellent.
Can you also discuss on side how to solve if links to parent is present (i.e each node contains link to parent) ?
Ok
Wait is over. 😊
😀
Awesome!!
Thanks
Your final commentary is a lot confusing and doesn’t explain why you return left or right when the other is null. It is because when right is null you found both modes on left so the left node down is LCA and vice-versa
Take some examples and it will be clear for sure
Understood
👍🏼
👏👏👏
This makes unnecessary work. Imagine that both nodes are on the left, your code still explores the entire right subtree, when it could already stop the search there. You can keep state locally in the class or use an helper method with an additional settable field to avoid this. On the other hand, the fact that you don't continue the search down the subtrees when root matches one of the nodes, reduces the search space, so depending on the case, it might end up being better or worse.
Uderstood
👍🏼
~12.30 is wrong.LCA could have been 5 also . So the conclusion is wrong. I guess needs an edit.
such an awful explanation