MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / initTabu

Function initTabu

javascript/0070-climbing-stairs.js:67–74  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

65};
66
67var initTabu = (n) => {
68 const tabu = new Array(n + 1).fill(0);
69
70 tabu[1] = 1;
71 tabu[2] = 2;
72
73 return tabu;
74};
75
76var search = (n, tabu) => {
77 for (let index = 3; index <= n; index++) {

Callers 1

climbStairsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected