Why does is this code not working ? | Sololearn: Learn to code for FREE!


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

4/30/2020 9:49:24 PM

Joseph Oritseweyinmi

3 Answers

New Answer


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


I Dunno what you are trying to with those loops j>convert.length make it less than and it prints 10


@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