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.
Note:A leaf is a node with no children.
1 用的递归的方法:root为空时,返回False;没有左右子树,且root.val==sum时,返回True;其余情况分左右子树来讨论,当然sum要随之变成sum-root.val,当走到叶子节点的时候,没有左右子树了,如果这时叶子节点的值等于此时target的值,则返回True,否则返回False
