以下為其虛擬碼: Function factorial(Integer n) If n = 0 ... 我覺得fibonacci其實不算好例子,因為非遞迴寫法也很簡單,甚至比遞迴解更簡單直覺。
確定! 回上一頁