Want to solve this problem? Login now to get access to solve the problems

Problem

Submissions

Solution

Leaderboard

Coming soon

4

Difficulty: EASY

Avg. time to solve

15 min

Success Rate

85%

Problem Statement

Suggest Edit

```
1. All the characters in the string are in lowercase.
2. Length of the strings will always be greater than zero.
```

```
The first line of the input contains an integer T denoting the number of test cases.
The first and the only line of each test case contains the string S.
```

```
The only line of output of each test case should contain 26 space-separated integers, where the ith integer represents the frequency of the ith character.
```

```
You do not need to print anything, it has already been taken care of. Just implement the given function.
```

```
1 <= T <= 100
1 <= len(S) <= 10^4
Time Limit: 1sec
```

```
1
abaaba
```

```
4 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
```

```
The frequency of ‘a’ is 4 and the frequency of ‘b’ is 2.
```

```
2
bbcccaaaa
z
```

```
4 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
```

```
For the first input, the frequency of ‘a’ is 4, ‘b’ is 2 and ‘c’ is 3.
For the second input, the frequency of ‘z’ is 1.
```

Want to solve this problem? Login now to get access to solve the problems