Something
public text v1 · immutable private int getTreeHeight(Node currentNode) {
if(currentNode == null) {
return 0;
} else {
return 1+getTreeHeight(currentNode.left)+getTreeHeight(currentNode.right);
}
} private int getTreeHeight(Node currentNode) {
if(currentNode == null) {
return 0;
} else {
return 1+getTreeHeight(currentNode.left)+getTreeHeight(currentNode.right);
}
}