Height of tree is the number of edges, not vertices

The videos and code for the disjoint sets section of the graphs card keeps referring to the height of trees as the maximum number of vertices in a path when it's technically defined as the maximum number of edges in a path. LeetCode might want to update this to avoid creating confusion for folks learning about graphs and trees.

Comments (0)