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

Function checkFrequency

javascript/0242-valid-anagram.js:62–70  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

60};
61
62const checkFrequency = (map) => {
63 for (const [char, count] of map) {
64 /* Time O(N) */
65 const isEmpty = count === 0;
66 if (!isEmpty) return false;
67 }
68
69 return true;
70};

Callers 1

isAnagramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected