Computes the maximum depth of the tree. That is, how many steps down from node it can go. If a tree is: root -> childA -> subChildB

// Yields 2, since there are at max two steps down from root
computeMaxDepth(root);
  • Type Parameters

    • T

    Parameters

    Returns number