标签:
class Solution { public: bool isSameTree(TreeNode *p, TreeNode *q) { if(p == NULL && q == NULL) return true; if(p == NULL || q == NULL) return false; if(p->val != q->val) return false; if(isSameTree(p->right,q->right)==false) return false; if(isSameTree(p->left,q->left)==false) return false; return true; } };
标签:
原文地址:http://www.cnblogs.com/xgcode/p/4321616.html