What if you need to go right three times? I don't understand how going right twice takes care of every situation where the new node needs to be the start of "depth" again.
You are recursively doing it you go right-> else part-> going left with incremented depth , going right with reset depth , same thing repeating for right again
How is your LeetCode grind going? Comment below a Leetcode question you need help with!! 🤠
Thank you! It was easy to understand after watching your vid!
which tool youre using for drawing on screen ?
Great explanation ! thanks
simple and clean, thanks
very good solution
Thank you! I'm glad it helped!
What if you need to go right three times? I don't understand how going right twice takes care of every situation where the new node needs to be the start of "depth" again.
You are recursively doing it you go right-> else part-> going left with incremented depth , going right with reset depth , same thing repeating for right again
you don’t even need to include current depth in the max function (line 10,17)
thank you for the explanation!
So happy you found it helpful!! Best of luck with your LeetCode grind! 🙏
Thank you!
You're welcome!
thank you kind sir
Nothing but THANKS
You are very welcome! :D
lets go vimmer!
Haha love this comment 🤣
Great explanation ! thanks