All pastes #366884 Raw Edit

Stuff

public java v1 · immutable
#366884 ·published 2007-02-21 23:45 UTC
rendered paste body
	public int getLeafCount() {		return getLeafCount(root);	}		private int getLeafCount(Node currentNode) {		if(currentNode.left != null && currentNode.right != null) {			return getLeafCount(currentNode.left)+getLeafCount(currentNode.right);		} else {			return 1;		}	}