Skip to content

Commit

Permalink
修改错误
Browse files Browse the repository at this point in the history
  • Loading branch information
lyremelody committed Jun 27, 2024
1 parent aaa3dd2 commit 9bddb50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 复杂度量级对比
* 多项式量级
Expand Down

0 comments on commit 9bddb50

Please sign in to comment.