Supporting a function that returns true if a tree has no two leaf nodes with depth differences greater than 1.