HomeToolsAbout

Introduction

What is it

Two properties make up a recursive behavior:

  1. Base case (terminal case)

    • terminating scenario (exit) that does not use recursion to produce an answer
  2. Recursive step

    • a set of rules that reduces all successive cases towards the base case
# Person's ancestor Base case: person's parent Recursive: person's parent's ancestors # Fib Sequence Base case: fib(0) = 0 Recursive: fib(1) = 1 Fib(n) = Fib(n-1) + Fib(n-2)
AboutContact