From 455520bde6ba29d01eb9b43d3aba88b8f7d2dead Mon Sep 17 00:00:00 2001 From: Po1vre Date: Thu, 28 Nov 2024 15:54:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=2070=20=E7=88=AC=E6=A5=BC=E6=A2=AF?= =?UTF-8?q?=E5=88=A0=E5=8E=BB=E5=A4=8D=E6=9D=82=E5=BA=A6=E7=9A=84=E5=86=85?= =?UTF-8?q?=E8=81=94=E5=85=AC=E5=BC=8F=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仅有单对的‘$’,与其他文档同步,故删去 --- "problems/0070.\347\210\254\346\245\274\346\242\257.md" | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git "a/problems/0070.\347\210\254\346\245\274\346\242\257.md" "b/problems/0070.\347\210\254\346\245\274\346\242\257.md" index a2f664a495..6a13a21cdb 100644 --- "a/problems/0070.\347\210\254\346\245\274\346\242\257.md" +++ "b/problems/0070.\347\210\254\346\245\274\346\242\257.md" @@ -130,8 +130,8 @@ public: }; ``` -* 时间复杂度:$O(n)$ -* 空间复杂度:$O(n)$ +* 时间复杂度:O(n) +* 空间复杂度:O(n) 当然依然也可以,优化一下空间复杂度,代码如下: @@ -154,8 +154,8 @@ public: }; ``` -* 时间复杂度:$O(n)$ -* 空间复杂度:$O(1)$ +* 时间复杂度:O(n) +* 空间复杂度:O(1) 后面将讲解的很多动规的题目其实都是当前状态依赖前两个,或者前三个状态,都可以做空间上的优化,**但我个人认为面试中能写出版本一就够了哈,清晰明了,如果面试官要求进一步优化空间的话,我们再去优化**。 @@ -524,3 +524,4 @@ impl Solution { + From 6776ecc172511158d6f516721afd8bfb91429014 Mon Sep 17 00:00:00 2001 From: Po1vre Date: Fri, 6 Dec 2024 14:37:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=200518=E9=9B=B6=E9=92=B1=E5=85=91?= =?UTF-8?q?=E6=8D=A2=E2=85=A1=20=E4=BF=AE=E6=94=B9=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0518.\351\233\266\351\222\261\345\205\221\346\215\242II.md" | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git "a/problems/0518.\351\233\266\351\222\261\345\205\221\346\215\242II.md" "b/problems/0518.\351\233\266\351\222\261\345\205\221\346\215\242II.md" index 0d35fb7cdf..1921866e5e 100644 --- "a/problems/0518.\351\233\266\351\222\261\345\205\221\346\215\242II.md" +++ "b/problems/0518.\351\233\266\351\222\261\345\205\221\346\215\242II.md" @@ -397,7 +397,7 @@ object Solution { } } ``` -## C +### C ```c int change(int amount, int* coins, int coinsSize) { @@ -444,3 +444,4 @@ public class Solution +