This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingStep through the call stack: factorial pushes frames until its base case and combines the products on the way back, while Euclid's gcd shrinks the pair with modulo until b reaches zero.
What this asks
Compute a factorial and the GCD of two numbers with plain recursion.
Recurse on the smaller instance, and connect each return back with one multiplication or one remainder.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing