Teaching Kids Programming: Videos on Data Structures and Algorithms
The factorial function f(n) implemented in Python using Recursion:
def f(n):
if n == 1:
return 1
return n * f(n - 1)
Factorial Recursive Equation


Recursion is basically a function calls itself! Some modern compilers may be able to optimise the Recursion implementation into a Loop: Understanding Tail Recursion – Visual Studio C++ – Assembly View
–EOF (The Ultimate Computing & Technology Blog) —
250 wordsLast Post: Counting Maximal Value Roots in Binary Tree using Depth First Search Algorithm
Next Post: Check If an Array Represents a Max Heap (Danny Heap Algorithm)