Chapter

Recursion

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How can recursive functions be written in C?

    "C supports recursion with no special syntax necessary. However, as a structured, procedural language, recursion is generally expensive and iterative or other non-recursive solutions are generally pre

  2. How can recursion be made tail-recursive in C?

    "This example was not tail-recursive as the recursive call was not the final operation (the sum was the final operation). To make this function tail recursive, we can carry the summation through to ea

  3. How is memoization implemented for recursive Fibonacci in C?

    "C is not a language that provides implicit memoization. Instead, we need to explicitly keep track of values using a table. In the following example, the table is passed to the function as an argument

Recursion | ComputerScienceOne | Bifalgorithm | Bifalgorithm