this is in reference to the question Granama Recipies link""

how this code will work

In the following code we are just maintaining the count of the characters from a to z. As for example the character ‘a’ represents the zero position in the array count1[] and when it appears in the character string str1 the zero position of count1 array is incremented by 1 (‘a’ - ‘a’ = 0). Hence we are just counting the character count in the array.

1 Like