fix(time-complexity): fixed some careless mistakes

pull/102/head
Cathay 2 years ago
parent f2ef38c618
commit fd4a519c6f

@ -117,7 +117,7 @@ func linearLogRecur(n float32) int {
return count return count
} }
/* 阶乘阶(递归实现) */ // factorialRecur 阶乘阶(递归实现)
func factorialRecur(n int) int { func factorialRecur(n int) int {
if n == 0 { if n == 0 {
return 1 return 1

@ -116,7 +116,7 @@ $$
```java title="" ```java title=""
// 算法 A 时间复杂度:常数阶 // 算法 A 时间复杂度:常数阶
void algorithm_A(n int) { void algorithm_A(int n) {
System.out.println(0); System.out.println(0);
} }
// 算法 B 时间复杂度:线性阶 // 算法 B 时间复杂度:线性阶
@ -1432,7 +1432,7 @@ $$
=== "Go" === "Go"
```go title="time_complexity_types.go" ```go title="time_complexity_types.go"
/* 阶乘阶(递归实现) */ // factorialRecur 阶乘阶(递归实现)
func factorialRecur(n int) int { func factorialRecur(n int) int {
if n == 0 { if n == 0 {
return 1 return 1

Loading…
Cancel
Save