Bornat Visualizer
AlgorithmsData StructuresNeural NetPracticePlaygroundCompareDocs

Recursion

Call stacks that grow and unwind before your eyes — Hanoi, factorial, and beyond.

4 visualizations

Compare

Factorial (Recursion)

Computes n! by recursion, showing the call stack winding up to the base case and unwinding with results.

Beginnerrecursionbase case

Tower of Hanoi

Moves a stack of disks between pegs one at a time, never placing a larger disk on a smaller one.

Intermediaterecursiondivide & conquer

Fibonacci (Naive Recursion)

Computes fib(n) = fib(n−1) + fib(n−2) directly by recursion — simple, but exponential because subproblems are solved again and again.

Beginnerrecursioncall stack

Power Set (Subsets by Recursion)

Generates every subset of a set by recursively branching into 'include this element' and 'exclude it' at each position.

Intermediaterecursionbacktracking
Bornat Data Structure Visualizer

Learn, visualize, experiment, and master data structures & algorithms with fully interactive, step-by-step animations.

Made with by Jibreel Bornat

Computer Engineering — Birzeit University

Explore

  • Sorting
  • Searching
  • Linked Lists
  • Stacks & Queues
  • Hashing
  • Trees
  • Graphs

App

  • All Algorithms
  • Practice
  • Playground
  • Documentation
  • About
  • Settings
Bornat Data Structure Visualizer© All Rights Reserved