About 16,000,000 results
Open links in new tab
  1. Maximum Depth of Binary Tree - GeeksforGeeks

    Apr 3, 2025 · Given a binary tree, the task is to find the maximum depth of the tree. The maximum depth or height of the tree is the number of edges in the tree from the root to the deepest …

  2. Maximum Depth of Binary Tree - LeetCode

    Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. …

  3. Understanding how to calculate the depth of a Binary Tree

    maxDepth(root.left) returns the max depth of the left sub tree. maxDepth(root.right) returns the max depth of the right sub tree. The max of these two is the maximal sub tree depth. Adding 1 …

  4. How to find the maximum depth of a binary tree - CodeStandard

    How to find the maximum depth of a binary tree The maximum depth of a binary tree is the number of nodes from the root node to the farthest leaf node. The maximum depth of a binary …

  5. Find Height of a Binary Tree - EnjoyAlgorithms

    The height or maximum depth of a binary tree is the total number of edges on the longest path from the root node to the leaf node. In other words, the height of a binary tree is equal to the …

  6. Maximum Depth of Binary Tree - NeetCode

    A better way to prepare for coding interviews.

  7. LeetCode 104: Maximum Depth of Binary Tree Solution in …

    Given the root of a binary tree, you need to return its maximum depth—the number of nodes along the longest path from root to leaf. In this blog, we’ll solve it with Python, exploring two …

  8. 104. Maximum Depth of Binary Tree - In-Depth Explanation

    To determine the solution to finding the maximum depth of a binary tree, we can use a strategy known as depth-first search (DFS). The intuition behind the approach is quite straightforward: …

  9. Height and Depth of a node in a Binary Tree - GeeksforGeeks

    Apr 3, 2025 · To calculate the height of a node k, we find the maximum depth of any leaf node in its subtree. Then: Height of node k = (Max depth of leaf in subtree) − (Depth of node k) − 1. …

  10. Find height or depth of a binary tree - OpenGenus IQ

    Steps to find height of binary tree. Following are the steps to compute the height of a binary tree: If tree is empty then height of tree is 0. else Start from the root and , Find the maximum depth …

Refresh