+ 3

How do you print duplicate characters from a string?

Can anyone tell me please how can we find duplicate characters from a string in Python, C, C#, Kotlin etc...

6th Jan 2021, 7:46 AM
Learner
2 ответов
+ 8
We don't give ready made codes here.. You have to attach your own attempt for further help.. But, One of the way would be to take the characters in a map and keep track of the count of each characters. Then, if the character count is greater than 1 then that means you found duplicate characters. This is not exactly the code you want but hope this will give you some inspiration.. https://code.sololearn.com/c52HF0PbSr0Z/?ref=app
6th Jan 2021, 8:05 AM
Minho
Minho - avatar
+ 1
Thank you, now it's clear to me... 😊
6th Jan 2021, 11:41 AM
Learner