/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; 在原来的基础上,添加对VisitCommonAncestor的返回值,以便找到目前节点之后,就可以不用再往下寻找了; */ class Solution { public: int lowestCommonAncestor(TreeNode* root, int...