About 22,400 results
Open links in new tab
  1. Diameter of a Binary Tree - GeeksforGeeks

    Oct 8, 2025 · The diameter of a binary tree is the number of edges in the longest path between any two nodes. For any node, the longest path passing through it goes from the deepest leaf …

  2. Diameter of a Binary Tree using Top Down Recursion

    Jan 24, 2025 · Given a binary tree, the task is to determine the diameter of the tree. The diameter/width of a tree is defined as the number of edges on the longest path between any …

  3. Write a program to Calculate Size of a tree | Recursion

    Jul 23, 2025 · The idea is to recursively calculate the size of tree. For each node (starting from root node), calculate the size of left subtree and right subtree and return the size of current …

  4. Binary Tree Data Structure - GeeksforGeeks

    Aug 2, 2025 · A Binary Tree Data Structure is a hierarchical data structure in which each node has at most two children, referred to as the left child and the right child. It is commonly used in …

  5. Diameter of a Graph Without Cycles - GeeksforGeeks

    Oct 28, 2025 · The diameter is found by recursively computing the height of each node based on its children. For every node, its height is determined as 1 + the maximum height among its …

  6. Diameter of an N-ary tree - GeeksforGeeks

    Mar 27, 2024 · Prerequisite: Diameter of a binary tree. The path can either start from one of the nodes and go up to one of the LCAs of these nodes and again come down to the deepest …

  7. Diameter of a Binary Tree | DSA Problem - GeeksforGeeks

    Aug 13, 2024 · Join us on this illuminating journey through the world of binary tree manipulation, where we guide you step-by-step through the process of efficiently determining the diameter of …

  8. Find the Diameter of a Binary Tree - GeeksforGeeks | Videos

    Aug 13, 2024 · Are you curious about how to determine the diameter of a binary tree? This tutorial will help you understand what the diameter of a binary tree is, why it's important, and how to …

  9. Diameter of a Binary Tree | Practice | GeeksforGeeks

    Given the root of a binary tree, your task is to find the diameter of the binary tree. The diameter (also called the width) of a binary tree is defined as the number of edges on the longest path …

  10. Diameter of a Binary Tree - GeeksforGeeks | Videos

    Jul 31, 2024 · The diameter of a tree (sometimes called the width) is the number of nodes on the longest path between two end nodes. The diagram below shows two trees each with diameter …