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

Function initMemo

javascript/0097-interleaving-string.js:90–95  ·  view source on GitHub ↗
(s1, s2)

Source from the content-addressed store, hash-verified

88};
89
90var initMemo = (s1, s2) =>
91 new Array(s1.length)
92 .fill() /* Time O(N) | Space O(N) */
93 .map(() =>
94 new Array(s2.length).fill(null),
95 ); /* Time O(M) | Space O(M) */
96
97var dfs = (s1, s2, s3, i, j, k, memo) => {
98 const left =

Callers 1

isInterleaveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected