+ 1

How to count letters?? Help

I figured out how to count letter A in array, but now how to count letters in given char array? Code should count number of every letter, like if I will input: AZZAB. It should output(in alphabet order) : A 2 B 1 Z 2 https://code.sololearn.com/cfyHXe4BzpH0/?ref=app

25th Sep 2021, 7:57 PM
Aruka
4 Respostas
+ 2
Sort the array and check the number of times the same element you get increase the counter
25th Sep 2021, 8:05 PM
Atul [Inactive]
0
Martin Taylor do you know how to output letter and its number without using range based loop?
26th Sep 2021, 2:07 PM
Aruka