+ 12
🔡 [Challenge] : How to return highest occurred character in a String? 🏆🏆
Note : Input a Single String For example : INPUT : aaaaaaaaaaaabbbbcddddeeegjkkkkeee OUTPUT : a INPUT : agaggsssssssssshhhjsjsjkk OUTPUT : s Best of Luck ( ße creative) + welcome any Language
15 ответов
+ 21
Using stream (oneliner) :
https://code.sololearn.com/cvxdf4239eVZ/?ref=app
+ 14
https://code.sololearn.com/cIdPxcHjWXc9/?ref=app
+ 8
https://code.sololearn.com/c8YsgTZi6TTN/#py
+ 7
here's my try in java :
https://code.sololearn.com/cpskQUnCf00t/?ref=app
+ 6
I will try in c
+ 6
python: print all most common items and nr if occurences
from collections import Counter
print(Counter(input()).most_common(1))
+ 5
@Petr Leliaev
most occurrence of the character in input string
+ 5
Here is my attempt:
https://code.sololearn.com/c1O37sfWiNXw/?ref=app
+ 5
+ 4
I added the number of occurences of the character to the output.
https://code.sololearn.com/cjKH0x005g6t/?ref=app
+ 2
What do you mean by "highest character"?