compute subtree sizes
recursive version
extends bst.py