class Solution { public: bool hasPathSum(TreeNode* root, int sum) { return PreOrder(root,sum-root->val); } bool PreOrder(TreeNode* root,int sum) { return (root->left==NULL&&root->right...