Back to exercises

Character Frequency Map

Iterate through the string once and increment the count for each character so the result maps each distinct character to its frequency.

Coding Exercises Easy O(n)

Character Frequency Map

Iterate through the string once and increment the count for each character so the result maps each distinct character to its frequency.

Return a frequency map for all characters in a string.