0

Why does is this code not working ?

I'm trying to find the most repeated character in the string, but it's not working, it keeps giving me 0. Please can someone help me. I'm using c#. https://code.sololearn.com/cWBLfW22vKKp/?ref=app

30th Apr 2020, 9:49 PM
Joseph Oritseweyinmi
Joseph Oritseweyinmi - avatar
3 odpowiedzi
+ 2
The main issue is that you are not comparing the characters. See in my example how you can solve it using a dictionary. https://code.sololearn.com/cUXV1Y25Awxy/?ref=app
30th Apr 2020, 10:21 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
+ 2
I Dunno what you are trying to with those loops j>convert.length make it less than and it prints 10
30th Apr 2020, 10:03 PM
Abhay
Abhay - avatar
+ 1
@Manu that's obviously he/she doesn't want to , didn't need to provide solution i guess,they were obviously asking for code ,almost anyone can tell for loop doesn't do anything accept looping through things
30th Apr 2020, 10:29 PM
Abhay
Abhay - avatar