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 ?
very good solution
Thank you! I'm glad it helped!
simple and clean, thanks
Great explanation ! thanks
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
thank you for the explanation!
So happy you found it helpful!! Best of luck with your LeetCode grind! 🙏
Thank you!
You're welcome!
you don’t even need to include current depth in the max function (line 10,17)
thank you kind sir
Nothing but THANKS
You are very welcome! :D
lets go vimmer!
Haha love this comment 🤣
Great explanation ! thanks