deno.land / x / masx200_leetcode_test@10.6.5 / substring-with-concatenation-of-all-words / counter.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
export function counter<T>(values: Iterable<T>): Map<T, number> { const cnts = new Map<T, number>(); for (const word of values) { cnts.set(word, (cnts.get(word) ?? 0) + 1); } return cnts;}
masx200_leetcode_test

Version Info

Tagged at
a year ago