Update space_complexity.md (#631)

* Update space_complexity.md

修改一个C语言的函数,c语言中错误使用C++的STL库的vector类,现在更正为直接使用定义数组去申请内存

* Update space_complexity.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
wangwang105
2023-07-20 18:56:35 +08:00
committed by GitHub
parent 2af77ff565
commit 30d1d36dd7

View File

@ -369,7 +369,7 @@
int a = 0; // O(1)
int b[10000]; // O(1)
if (n > 10)
vector<int> nums(n); // O(n)
int nums[n] = {0}; // O(n)
}
```