You are viewing a single comment's thread. Return to all comments →
javascript
console.time("start"); let result = []; for (let i = 0; i < queries.length; i++) { let sum = 0; for (let j = 0; j < stringList.length; j++) { if (stringList[j] === queries[i]) { sum += 1; } } result.push(sum); } console.timeEnd("start"); return result;
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
javascript