File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ namespace cs
174174 int Height () const { return height; }
175175
176176 // Returns the balance factor of this node.
177- // Balance factor of a node is the difference between its right and the left subtrees.
177+ // Balance factor of a node is the difference between the heights
178+ // of its right and the left subtrees.
178179 // This method is supposed to be called by the friend classes (trees).
179180 int BalanceFactor () const
180181 {
@@ -445,7 +446,8 @@ namespace cs
445446 /* *
446447 * @brief Calculates the height of a tree rooted in @p root node.
447448 * Height of a tree is the maximal number of edges in a path from
448- * its root to any of its leaves.
449+ * its root to any of its leaves. Thus, a tree comprised of just
450+ * a single node has the height equal to 0.
449451 *
450452 * @param root - tree root.
451453 *
You can’t perform that action at this time.
0 commit comments