public boolean isSubtree(TreeNode T1, TreeNode T2) {
        // write your code here
        if (T2 == null)
            return true;
        if (T1 == null) {
            return false;
        }
        if (T1.val == T2.val) {
            if (helper(T1, T2))
                return true;
        }
        return isSubtree(T1.left, T2) || isSubtree(T1.right, T2);
    }