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:
https://leetcode.com/problems/maximum-depth-of-binary-tree/discuss/956252/Python-3-DFS-and-BFS-Solution-Explained-(video-%2B-code)
More leetcode questions solved:
https://www.youtube.com/watch?v=O5yxoFS_diY&list=PLr9zbByiJa3Ua2AgTrdvot6AQ3b4CxWrF
Download
0 formats
No download links available.
Maximum Depth of Binary Tree | Leet code 104 | Theory explained + Python code | NatokHD