added leaf-to-root-path-with sum method to tree