/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; */ class Solution { private: bool com(TreeNode* root1, TreeNode * root2){ if(root1 == nullptr && root2 != nullptr) return false; if(root2 ==...