Hello,
Why do we check if the frequency of the right char in the map is >= 0 while we just can compare it to 0:
the number of occurrences of the right character reaches 0 => we have a complete match
if (charFrequencyMap[rightChar] >= 0) { // count every matching of a character
matched++;
}