mirror of
https://github.com/krahets/hello-algo.git
synced 2025-01-23 22:40:25 +08:00
fix(time-complexity): fixed some careless mistakes
This commit is contained in:
parent
f2ef38c618
commit
fd4a519c6f
@ -117,7 +117,7 @@ func linearLogRecur(n float32) int {
|
||||
return count
|
||||
}
|
||||
|
||||
/* 阶乘阶(递归实现) */
|
||||
// factorialRecur 阶乘阶(递归实现)
|
||||
func factorialRecur(n int) int {
|
||||
if n == 0 {
|
||||
return 1
|
||||
|
@ -116,7 +116,7 @@ $$
|
||||
|
||||
```java title=""
|
||||
// 算法 A 时间复杂度:常数阶
|
||||
void algorithm_A(n int) {
|
||||
void algorithm_A(int n) {
|
||||
System.out.println(0);
|
||||
}
|
||||
// 算法 B 时间复杂度:线性阶
|
||||
@ -1432,7 +1432,7 @@ $$
|
||||
=== "Go"
|
||||
|
||||
```go title="time_complexity_types.go"
|
||||
/* 阶乘阶(递归实现) */
|
||||
// factorialRecur 阶乘阶(递归实现)
|
||||
func factorialRecur(n int) int {
|
||||
if n == 0 {
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user