it
function f(a, b) {
b = b || {};
if (b[a]) return b[a];
if (a <= 1) return 1;
return b[a] = f(a - 1, b) + f(a - 2, b);
}
What is it used for?
Looks like a broken factorial using dynamic programming techniques
Обсуждают сегодня