修改0383.赎金信.md的时间复杂度分析

This commit is contained in:
‘windscape’
2025-01-13 15:47:55 +08:00
parent 6731702602
commit 61c04cdc43

View File

@ -104,7 +104,7 @@ public:
};
```
* 时间复杂度: O(n)
* 时间复杂度: O(m+n)其中m表示ransomNote的长度n表示magazine的长度
* 空间复杂度: O(1)
@ -470,3 +470,4 @@ bool canConstruct(char* ransomNote, char* magazine) {
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>