/** * computes and returns the height of the tree * * @return the height */ public int getHeight() { int height = 0; for (V v : getVertices()) { height = Math.max(height, getDepth(v)); } return height; }
/** * computes and returns the height of the tree * * @return the height */ public int getHeight() { int height = 0; for(V v : getVertices()) { height = Math.max(height, getDepth(v)); } return height; }