Update time_complexity.rs

This commit is contained in:
Yudong Jin 2024-12-04 17:31:46 +08:00 committed by GitHub
parent 241644ca52
commit 5e93c3f024
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,7 +86,7 @@ fn exp_recur(n: i32) -> i32 {
if n == 1 {
return 1;
}
exp_recur(n - 1) + exp_recur(n - 1)
exp_recur(n - 1) + exp_recur(n - 1) + 1
}
/* 对数阶(循环实现) */