A repetitive algorithm uses recursion whenever the algorithm appears in the definition itself. Simplest example of a recursive definition is that for the factorial function; defined as

n* (n – 1) ! if n > 0 general case
A repetitive algorithm uses recursion whenever the algorithm appears in the definition itself. Simplest example of a recursive definition is that for the factorial function; defined as

n* (n – 1) ! if n > 0 general case
No comments:
Post a Comment