R
Recursion Tree
Visualize recursive function call trees for Fibonacci, factorial, and more.
Algorithms
v1.0.0
31 uses
R
Recursion Tree
Esc
or
Ctrl+Shift+F
to exit
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
- 1 Choose a recursive function from the dropdown (Fibonacci, Factorial, etc.)
- 2 Enter an input value (keep it small for Fibonacci — grows fast!)
- 3 Click Build Tree to watch the call tree expand
- 4 Hover over nodes to see their return values
- 5 Red-highlighted nodes show duplicate computations
- 6 Compare call counts to see exponential vs linear growth
More Simulators in Algorithms
B
Binary Search Tree
AlgorithmsInsert, search, and delete nodes in a binary search tree with real-time visualization.
S
Sorting Visualizer
AlgorithmsWatch sorting algorithms in action with colorful animated bar charts.
D
Database B-Tree
AlgorithmsVisualize how databases use B-Trees for indexing — insert keys and watch the tree split and grow.