mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
update 0349.两个数组的交集: 添加复杂度分析
This commit is contained in:
@ -72,6 +72,9 @@ public:
|
||||
};
|
||||
```
|
||||
|
||||
* 时间复杂度: O(mn)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
## 拓展
|
||||
|
||||
那有同学可能问了,遇到哈希问题我直接都用set不就得了,用什么数组啊。
|
||||
@ -110,6 +113,8 @@ public:
|
||||
};
|
||||
```
|
||||
|
||||
* 时间复杂度: O(m + n)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
## 其他语言版本
|
||||
|
||||
|
Reference in New Issue
Block a user