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 pricingPrecompute inverse factorials for constant-time nCr lookups.
What this asks
Precompute inverse factorials so many combination queries run in constant time.
Build factorials, take one inverse at n via Fermat, then walk downward multiplying.
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