Maximum Depth of Binary Tree | Leet code 104 | Theory explained + Python code

preview_player
Показать описание
This video is a solution to Leet code 104, Maximum Depth of Binary Tree. I explain the question, go over how the logic / theory behind solving the question and finally solve it using Python code.

Comment below if you have a better solution to this problem!

Let me know if you have any feedback and don't forget to subscribe for more videos!

Time stamps:
0:00 Question Explained
1:19 BFS
6:18 DFS

Code:

More leetcode questions solved:
Рекомендации по теме
Комментарии
Автор

Nice, i took a break from leetcode mid October and now I'm back in the grind with the December challenge!!

Let's do this!!

nands
Автор

Thanks Anish, This was very helpful. Though I wish you couple explain more on DFS. I see nodes return a None Type on every recursion. Unsure how + 1 works on them then.

saugatsaxena
welcome to shbcf.ru