A cache that is never written to cannot save any work.
Acceptance criteria
- 1.#out should show stored 3.
A cache that is never written to cannot save any work.
const memo = new Map(); function climb(n) { if (n <= 2) return n; return climb(n - 1) + climb(n - 2); } climb(5); document.querySelector('#out').textContent = "stored " + memo.size;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.