• + 0 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;