Keith, > Also, the product-tree algorithm is recursive and might therefore have a space complexity which is prohibitive in some cases. no, at each level you only need to store the root of the current subtree, which is the product of all corresponding leaves, i.e., has the same space complexity. Paul