From 9bddb5047c824cdb2d4cfc4c4945b5e99f0d0adf Mon Sep 17 00:00:00 2001 From: lyremelody Date: Thu, 27 Jun 2024 19:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-structures-and-algorithms/complexity-analysis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/technology/computer-theory/data-structures-and-algorithms/complexity-analysis.md b/content/technology/computer-theory/data-structures-and-algorithms/complexity-analysis.md index 44d013b..4e39403 100644 --- a/content/technology/computer-theory/data-structures-and-algorithms/complexity-analysis.md +++ b/content/technology/computer-theory/data-structures-and-algorithms/complexity-analysis.md @@ -120,7 +120,7 @@ params: 针对上面这段代码的时间复杂度分析: 1. 单独看cal()函数。假设f()只是一个普通的操作,那第3~4行的时间复杂度就是,T1(n)=O(n)。 2. 但f()函数本身不是一个简单的操作,它的时间复杂度是T2(n)=O(n) -3. 所以,整个cal()函数的时间复杂度就是,T(n) = T1(n) * T2(n) = O(n*n) = O(n2)。 +3. 所以,整个cal()函数的时间复杂度就是,T(n) = T1(n) * T2(n) = O(n*n) = O(n^2)。 ### 4.2 复杂度量级对比 * 多项式量级