+ 7
CHALLENGE! Count frequency of letters in a text.
Count frequency of letters in a text. by: Nick Description: Count the frequency of all letters in the text. Display result in alphabetic order Only count characters that are letters Uppercase / lowercase letters viewed as the same letter input> This is the text. output> e appears 2 times h appears 2 times i appears 2 times s appears 2 times t appears 4 times x appears 1 time
15 Answers
+ 14
+ 13
Here is my try using Java:
https://code.sololearn.com/ct6rYdq53kq0/?ref=app
+ 10
https://code.sololearn.com/cCUU4PYq0tKX/?ref=app
+ 7
Check this out!
https://code.sololearn.com/cc0U7x0yh98p/?ref=app
+ 7
Hey @Nick, here's my attempt, hope it meets your requirements : )
https://code.sololearn.com/c11MTH3t1zEK/?ref=app
+ 5
python one liner:
from collections import Counter
print("\n".join("Letter "+l+" present "+str(v)+" times" for l,v in Counter(input()).items()))
+ 5
Twoliner :)
https://code.sololearn.com/cvq0cY5ATca1/?ref=app
+ 4
Python solution ...
https://code.sololearn.com/cBs4XswWkD9y/?ref=app
+ 4
+ 4
https://code.sololearn.com/c2h6swgJcpLN/?ref=app
+ 2
+ 2
https://code.sololearn.com/cNT3U2koZUwg/?ref=app