Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Joseph D
Terminology of the problem

Joseph D

Nov 17, 2024

As per the definitions in "Introduction to Tree":

  • Height of a Node: The number of edges on the longest path from the node to a leaf.
  • Depth of a Node: The number of edges from the node to the tree's root node.

How come the answers to the problem is simply how many nodes are there in the longest path rather than being the "depth" nor "height"?

4

0

Comments
Comments

On this page