Recursion Tree
Visualize recursive function call trees for Fibonacci, factorial, and more.
Category: Algorithms
·
v1.0.0
Total Calls
0
Max Depth
0
Result
—
About This Simulator
Watch how recursive functions unfold into a tree of calls. This simulator traces each function call, building a visual tree that shows the call stack depth, return values, and how many redundant computations happen. Great for understanding why memoization matters and how recursion depth affects performance.
How It Works
- Choose a recursive function from the dropdown (Fibonacci, Factorial, etc.)
- Enter an input value (keep it small for Fibonacci — grows fast!)
- Click Build Tree to watch the call tree expand
- Hover over nodes to see their return values
- Red-highlighted nodes show duplicate computations
- Compare call counts to see exponential vs linear growth