MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / initBuffer

Function initBuffer

javascript/0043-multiply-strings.js:21–25  ·  view source on GitHub ↗
(num1, num2)

Source from the content-addressed store, hash-verified

19};
20
21var initBuffer = (num1, num2) => {
22 const size = num1.length + num2.length;
23
24 return new Array(size).fill(0); /* Space (N + M) */
25};
26
27var multiplication = (num1, num2, buffer) => {
28 for (let i = num1.length - 1; 0 <= i; i--) {

Callers 1

multiplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected