Few Liner in c++


#1
TreeNode* Solution::solve(TreeNode* A, TreeNode* B) {
    if(A == NULL)return B;
    if(B == NULL)return A;//two base conditions

    int val1 = A->val , val2 = B->val;
    A->val = val1 + val2;

    A->left = solve(A->left,B->left);
    A->right =solve(A->right,B->right);

    return A;
}