Given a node n on a binary tree, find the longest distance to a leaf node
Sigiloso
public int heightOfTree() { return heightUtil(getRoot()); } private int heightUtil(Node root) { if (root == null) { return -1; } int left = heightUtil(root.getLeft()); int right = heightUtil(root.getRight()); return Math.max(left, right) + 1; }