mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	fix(time-complexity): fixed some careless mistakes
This commit is contained in:
		@ -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
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user