LeetCode 104. Maximum Depth of Binary Tree - Interview Prep Ep 65
LeetCode 104. Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/
⭐ Support my channel and connect with me:
https://www.youtube.com/channel/UCPL5uAbYQ40HwAdOe4ikI0w/join
Solutions explained:
Recursive solution: We'll add one to each level before traversing to its left and right children, return zero when the current node is null.
Iterative solution: We can use two extra data structures to help us mimic what happens when the recursive program runs, one is the stack that holds the tree nodes that we'll iterate on, the other is the depths of each of the node.
// TOOLS THAT I USE:
○ Memory Foam Set Keyboard Wrist Rest Pad - https://amzn.to/3cOGOAj
○ Electric Height Adjustable Standing Desk - https://amzn.to/2S9YexJ
○ Apple Magic Keyboard (Wireless, Rechargable) - https://amzn.to/36gy5FJ
○ Apple Magic Trackpad 2 (Wireless, Rechargable) - https://amzn.to/36ltimu
○ Apple MacBook Pro - https://amzn.to/30iSvKE
○ All-In One Printer - https://amzn.to/34etmSi
○ Apple AirPods Pro - https://amzn.to/2GpVYQf
○ My new favorite Apple Watch - https://amzn.to/2EIIUFd
// MY FAVORITE BOOKS:
○ Introduction to Algorithms - https://amzn.to/36hxHXD
○ Designing Data-Intensive Applications - https://amzn.to/2S7snOg
○ Head First Java - https://amzn.to/2ScLDKa
○ Design Patterns - https://amzn.to/2SaGeU2
Follow me on Github for complete LeetCode solutions: https://github.com/fishercoder1534/Leetcode
Support me on Patreon: https://www.patreon.com/fishercoder
My ENTIRE Programming Equipment and Computer Science Bookshelf:
https://www.amazon.com/shop/fishercoder
And make sure you subscribe to my channel!
Your comments/thoughts/questions/advice will be greatly appreciated!
#softwareengineering #leetcode #algorithms #coding #interview #SDE #SWE #SiliconValley #programming #datastructures
Видео LeetCode 104. Maximum Depth of Binary Tree - Interview Prep Ep 65 канала Fisher Coder
⭐ Support my channel and connect with me:
https://www.youtube.com/channel/UCPL5uAbYQ40HwAdOe4ikI0w/join
Solutions explained:
Recursive solution: We'll add one to each level before traversing to its left and right children, return zero when the current node is null.
Iterative solution: We can use two extra data structures to help us mimic what happens when the recursive program runs, one is the stack that holds the tree nodes that we'll iterate on, the other is the depths of each of the node.
// TOOLS THAT I USE:
○ Memory Foam Set Keyboard Wrist Rest Pad - https://amzn.to/3cOGOAj
○ Electric Height Adjustable Standing Desk - https://amzn.to/2S9YexJ
○ Apple Magic Keyboard (Wireless, Rechargable) - https://amzn.to/36gy5FJ
○ Apple Magic Trackpad 2 (Wireless, Rechargable) - https://amzn.to/36ltimu
○ Apple MacBook Pro - https://amzn.to/30iSvKE
○ All-In One Printer - https://amzn.to/34etmSi
○ Apple AirPods Pro - https://amzn.to/2GpVYQf
○ My new favorite Apple Watch - https://amzn.to/2EIIUFd
// MY FAVORITE BOOKS:
○ Introduction to Algorithms - https://amzn.to/36hxHXD
○ Designing Data-Intensive Applications - https://amzn.to/2S7snOg
○ Head First Java - https://amzn.to/2ScLDKa
○ Design Patterns - https://amzn.to/2SaGeU2
Follow me on Github for complete LeetCode solutions: https://github.com/fishercoder1534/Leetcode
Support me on Patreon: https://www.patreon.com/fishercoder
My ENTIRE Programming Equipment and Computer Science Bookshelf:
https://www.amazon.com/shop/fishercoder
And make sure you subscribe to my channel!
Your comments/thoughts/questions/advice will be greatly appreciated!
#softwareengineering #leetcode #algorithms #coding #interview #SDE #SWE #SiliconValley #programming #datastructures
Видео LeetCode 104. Maximum Depth of Binary Tree - Interview Prep Ep 65 канала Fisher Coder
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![LeetCode 98. Validate Binary Search Tree - Interview Prep Ep 69](https://i.ytimg.com/vi/kR5AxWHa9nc/default.jpg)
![Maximum Depth of Binary Tree - 3 Solutions - Leetcode 104 - Python](https://i.ytimg.com/vi/hTM3phVI6YQ/default.jpg)
![GOOGLE - MAXIMUM DEPTH OF BINARY TREE (LeetCode)](https://i.ytimg.com/vi/D2cFSDfg0So/default.jpg)
![Binary Tree Maximum Path Sum (Animated Walkthrough) (LeetCode)](https://i.ytimg.com/vi/6cA_NDtpyz8/default.jpg)
![Minimum Depth of Binary Tree | Leet code 111 | Theory explained + Python code](https://i.ytimg.com/vi/m6oP73pSki4/default.jpg)
![LeetCode 108. Convert Sorted Array to Binary Search Tree - Interview Prep Ep 71](https://i.ytimg.com/vi/VVSnM5DGvjg/default.jpg)
![Minimum Depth of Binary Tree, Do you do these mistakes in an interview ? LeetCode - 111, 104](https://i.ytimg.com/vi/JrrPcXix8zo/default.jpg)
![LeetCode 102. Binary Tree Level Order Traversal - Interview Prep Ep 70](https://i.ytimg.com/vi/sFDNL6r5aDM/default.jpg)
![LeetCode 94. Binary Tree Inorder Traversal ITERATIVELY - Interview Prep Ep 75](https://i.ytimg.com/vi/QxFOR8sQuB4/default.jpg)
![LeetCode 489. Robot Room Cleaner 中文 | 扫地机器人 | 谷歌脸书面试题 | 加锁题](https://i.ytimg.com/vi/AkLu58eJQPc/default.jpg)
![LeetCode Solution - 104 Maximum Depth Binary Tree | JavaScript DFS](https://i.ytimg.com/vi/a4LNgiIcBTU/default.jpg)
![](https://i.ytimg.com/vi/JVeBwG7KRbM/default.jpg)
![Balanced Binary Tree - Leetcode 110 - Python](https://i.ytimg.com/vi/QfJsau0ItOY/default.jpg)
![Robot Room Cleaner (LeetCode 489 - Hard)](https://i.ytimg.com/vi/UOKq1tKogB4/default.jpg)
![L14. Maximum Depth in Binary Tree | Height of Binary Tree | C++ | Java](https://i.ytimg.com/vi/eD3tmO66aBA/default.jpg)
![Binary Search Tree Tutorial - Traversal, Creation and More](https://i.ytimg.com/vi/edfGASf_QxE/default.jpg)
![Word Ladder - Breadth First Search - Leetcode 127 - Python](https://i.ytimg.com/vi/h9iTnkgv05E/default.jpg)
![minimum depth of binary tree leetcode | leetcode 111 | bfs dfs level order traversal](https://i.ytimg.com/vi/6aChG_3jMAQ/default.jpg)
![GOOGLE - BINARY TREE LEVEL ORDER TRAVERSAL (LeetCode)](https://i.ytimg.com/vi/XZnWETlZZ14/default.jpg)
![How to use LeetCode effectively](https://i.ytimg.com/vi/CltYi33y0ls/default.jpg)