原题如下 Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. Note: A leaf is a node with no children. Example: Given the below binary tree and sum =
原题如下 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. 给定一棵二叉树和sum,判断是否存在这样的一条从根到叶子的路径,它的路径上的值的总和等于s