From 30d1d36dd7b00b744b549acbaf499ef74060111e Mon Sep 17 00:00:00 2001 From: wangwang105 <63837567+wangwang105@users.noreply.github.com> Date: Thu, 20 Jul 2023 18:56:35 +0800 Subject: [PATCH] Update space_complexity.md (#631) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update space_complexity.md 修改一个C语言的函数,c语言中错误使用C++的STL库的vector类,现在更正为直接使用定义数组去申请内存 * Update space_complexity.md --------- Co-authored-by: Yudong Jin --- docs/chapter_computational_complexity/space_complexity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chapter_computational_complexity/space_complexity.md b/docs/chapter_computational_complexity/space_complexity.md index 232a96517..725c26919 100755 --- a/docs/chapter_computational_complexity/space_complexity.md +++ b/docs/chapter_computational_complexity/space_complexity.md @@ -369,7 +369,7 @@ int a = 0; // O(1) int b[10000]; // O(1) if (n > 10) - vector nums(n); // O(n) + int nums[n] = {0}; // O(n) } ```