java.lang.Object
org.jhotdraw8.fxbase.tree.TreeMaxDepthCalculator
Computes the maximal depth of a tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> intgetMaxDepth(T root, Function<T, Iterable<T>> getChildren) Computes the maximal depth of the sub-tree starting at this tree node.
-
Constructor Details
-
TreeMaxDepthCalculator
public TreeMaxDepthCalculator()
-
-
Method Details
-
getMaxDepth
Computes the maximal depth of the sub-tree starting at this tree node.References:
- Binary Tree: Maximum Depth/Height Of Deepest Node using recursive and iterative way
- dev.to
- Returns:
- the maximal depth
-