s-tree Two C++ solutions to the problem at http://www.cs.duke.edu/courses/cps100/fall03/assign/extra/treesum.html One is less embarrassing than the other