From 718e67acef29a7f21f7914d0b1e175b2b52a4063 Mon Sep 17 00:00:00 2001 From: Guanzhong Pan Date: Sat, 22 Jan 2022 10:41:09 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=200096.=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E4=BA=8C=E5=8F=89=E6=90=9C=E7=B4=A2=E6=A0=91.md=20C?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E8=A7=A3=E6=B3=95=E6=B3=A8=E9=87=8A=E9=94=99?= =?UTF-8?q?=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0096.不同的二叉搜索树.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0096.不同的二叉搜索树.md b/problems/0096.不同的二叉搜索树.md index d6f7aca7..d334a29c 100644 --- a/problems/0096.不同的二叉搜索树.md +++ b/problems/0096.不同的二叉搜索树.md @@ -247,7 +247,7 @@ int numTrees(int n){ int i, j; for(i = 1; i <= n; ++i) { for(j = 1; j <= i; ++j) { - //递推公式:dp[i] = d[i] + 根为j时左子树种类个数 * 根为j时右子树种类个数 + //递推公式:dp[i] = dp[i] + 根为j时左子树种类个数 * 根为j时右子树种类个数 dp[i] += dp[j - 1] * dp[i - j]; } }