Skip to content

Commit c94b3a5

Browse files
committed
Update 01.Recursive-Algorithm.md
1 parent cdcd526 commit c94b3a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Contents/09.Algorithm-Base/02.Recursive-Algorithm/01.Recursive-Algorithm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
举个简单的例子来了解一下递归算法。比如阶乘的计算方法在数学上的定义为:
66

7-
$fact(n) = \begin{cases} 1 & \text{n = 0} \cr n * fact(n - 1) & \text{n > 0} \end{cases}$
7+
$fact(n) = \begin{cases} 1 & \text{n = 0} \cr n \times fact(n - 1) & \text{n > 0} \end{cases}$
88

99
根据阶乘计算方法的数学定义,我们可以使用调用函数自身的方式来实现阶乘函数 $fact(n)$ ,其实现代码可以写作:
1010

0 commit comments

Comments
 (0)