Update time_complexity.md (#1578)

* Bug fixes and improvements (#1577)
 * correct the implement of exp_recur function and remove +1 operation from the function to simulate the cell division process

* Update time_complexity.rs

* Update time_complexity.md

---------

Co-authored-by: zouy26 <zouy26@chinaunicom.cn>
Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
YuZou 2024-12-04 17:36:11 +08:00 committed by GitHub
parent 2a9db6d039
commit ca774eefbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1120,7 +1120,7 @@ $$
生物学的“细胞分裂”是指数阶增长的典型例子:初始状态为 $1$ 个细胞,分裂一轮后变为 $2$ 个,分裂两轮后变为 $4$ 个,以此类推,分裂 $n$ 轮后有 $2^n$ 个细胞。
下图和以下代码模拟了细胞分裂的过程,时间复杂度为 $O(2^n)$
下图和以下代码模拟了细胞分裂的过程,时间复杂度为 $O(2^n)$ 。请注意,输入 $n$ 表示分裂轮数,返回值 `count` 表示总分裂次数。
```src
[file]{time_complexity}-[class]{}-[func]{exponential}