function TreeNode(x) { this.val = x this.left = null this.right = null } /** * * @param root TreeNode类 * @param sum int整型 * @return bool布尔型 */ function hasPathSum(root, sum) { }