Back to Browse

Maximum Depth of Binary Tree - LeetCode 104 (Depth First Search)

559 views
Sep 17, 2020
5:18

Another easy LeetCode Question part of the LeetCode easy series. This question wants us to return the maximum depth of a #binary #tree. To solve this we traversed the tree using #dfs and calculated the max length of the left and right children paths for each node in the binary tree. Happy coding! TIMESTAMPS -------------------------------------------------------------------------------------------------------- Illustration: 00:00 Complexity analysis: 03:20 Code: 03:54 QUESTION LINKS --------------------------------------------------------------------------------------------------------- Difficulty: Easy Source Code: https://github.com/MichaelVandi/CodingInterview/blob/master/Easy/09_17_2020_maximum_depth_of_binary_tree.java Problem Link: https://leetcode.com/problems/maximum-depth-of-binary-tree/ FIND ME HERE -------------------------------------------------------------------------------------------------------- Website: https://mvandi.com Instagram: https://www.instagram.com/mike_ehl_/ Twitter: https://twitter.com/michael_vandi Github: https://github.com/MichaelVandi/ Evalu8 (Side project): https://evalu8.xyz

Download

1 formats

Video Formats

360pmp48.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Maximum Depth of Binary Tree - LeetCode 104 (Depth First Search) | NatokHD