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>
pull/639/head
wangwang105 1 year ago committed by GitHub
parent 2af77ff565
commit 30d1d36dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
}
```

Loading…
Cancel
Save