depth method

int depth()

Returns the number of levels in the tree.

Implementation

int depth() {
  return root.depth();
}