Skip to content

Latest commit

 

History

History
14 lines (14 loc) · 373 Bytes

100.md

File metadata and controls

14 lines (14 loc) · 373 Bytes

#100. Same Tree 题目链接

bool isSameTree(struct TreeNode* p, struct TreeNode* q) {
    if(p==NULL&&q==NULL)
        return true;
    else if(p==NULL||q==NULL)
        return false;
    else if(p->val==q->val)
        return isSameTree(p->left,q->left)*isSameTree(p->right,q->right);
    else 
        return false;
}