I'm going to have a lecture about Tree, in the slide have a piece of code like that
public int iPathLength(int level) {
return level + this.getLeft().iPathLength(level + 1)
+ this.getRight().iPathLength(level + 1);
I think this function is wrong since as I concern, recursive function have to have a base case to quit the recursive loop. Please help me to figure out the problem :(