[Algorithm] Recursion 遞迴

定義

Recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves from within their own code.

適用的類型

  • 資料是按遞迴定義的。例:Fibonacci number
  • 問題解法按遞迴演算法實現。例:Tower of Hanoi
  • 資料的結構形式是按遞迴定義的。例:Binary Tree

Last Updated on 2023/08/16 by A1go

目錄
Bitnami