mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 15:09:40 +08:00
修改0383.赎金信.md的时间复杂度分析
This commit is contained in:
@ -104,7 +104,7 @@ public:
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
* 时间复杂度: O(n)
|
* 时间复杂度: O(m+n),其中m表示ransomNote的长度,n表示magazine的长度
|
||||||
* 空间复杂度: O(1)
|
* 空间复杂度: O(1)
|
||||||
|
|
||||||
|
|
||||||
@ -470,3 +470,4 @@ bool canConstruct(char* ransomNote, char* magazine) {
|
|||||||
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
|
||||||
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
|
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user