public static int height1 (InspectableTree T) { int h = 0; PositionIterator positer = T.positions(); while (positer.hasNext()) { Position v = positer.nextPosition(); if (T.isExternal(v)) h = Math.max(h, depth(T, v)); } return h; }