From 9f7a9fde20a3cbca9cf5a647c23f46e9f9a04c5d Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Thu, 5 Jan 2023 01:02:00 +0800 Subject: [PATCH] Update codes/typescript/chapter_computational_complexity/time_complexity.ts Co-authored-by: Justin Tse --- .../chapter_computational_complexity/time_complexity.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codes/typescript/chapter_computational_complexity/time_complexity.ts b/codes/typescript/chapter_computational_complexity/time_complexity.ts index 136e5e25f..e5dde67c6 100644 --- a/codes/typescript/chapter_computational_complexity/time_complexity.ts +++ b/codes/typescript/chapter_computational_complexity/time_complexity.ts @@ -118,7 +118,9 @@ function factorialRecur(n: number): number { return count; } -var n = 8; +/* Driver Code */ +// 可以修改 n 运行,体会一下各种复杂度的操作数量变化趋势 +const n = 8; console.log("输入数据大小 n = " + n); let count = constant(n);