diff --git a/problems/0349.两个数组的交集.md b/problems/0349.两个数组的交集.md index 905bf4b2..0da0e30c 100644 --- a/problems/0349.两个数组的交集.md +++ b/problems/0349.两个数组的交集.md @@ -72,6 +72,9 @@ public: }; ``` +* 时间复杂度: O(mn) +* 空间复杂度: O(n) + ## 拓展 那有同学可能问了,遇到哈希问题我直接都用set不就得了,用什么数组啊。 @@ -110,6 +113,8 @@ public: }; ``` +* 时间复杂度: O(m + n) +* 空间复杂度: O(n) ## 其他语言版本