#K71647. Character Frequency Counter
Character Frequency Counter
Character Frequency Counter
You are given a string S consisting of lowercase English letters. Your task is to determine the frequency of each letter from 'a' to 'z' in S. For every letter, output the number of times it appears in the string.
Note: The output should be 26 integers separated by a space, each representing the count for letters 'a' through 'z' respectively.
Mathematically, if we denote by \( f(c) \) the frequency of character \( c \) in the string \( S \), you are to compute and output:
\[ f(a), f(b), \dots, f(z) \]For example, if \( S = "abcdabc" \), then \( f(a)=2, f(b)=2, f(c)=2, f(d)=1 \) and all other counts are zero.
inputFormat
The input consists of a single line containing the string S. The string consists only of lowercase English letters and may be empty.
Input Format:
S
outputFormat
Output 26 space-separated integers on a single line. These integers represent the frequency of each letter from 'a' to 'z' in the string S.
Output Format:
c[0] c[1] ... c[25]
where c[i] is the count of the \( (i+1)^{th} \) lowercase English letter.
## sampleabcdabc
2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0