I was wondering how would you get the number of duplicate letters in a string and store the information into a hashtable? As in this order: {(DUPLICATE LETTER HERE) : (NUMBER OF DUPLICATES FOR THAT LETTER HERE)} I have been having a lot of trouble with getting an answer and am looking for code for this specific function. Thanks!
Asked
Active
Viewed 17 times
0
-
Are you allowed to use dictionaries? – PM 77-1 Nov 28 '22 at 21:44
-
As long as the information is in a {Value : Key} format, dictionaries would work as well. – 86BuickRegal Nov 28 '22 at 22:01
-
See https://stackoverflow.com/questions/40950905/find-count-of-characters-within-the-string-in-python or similar. – PM 77-1 Nov 28 '22 at 22:03
-
This link **[here](https://stackoverflow.com/questions/40950905/find-count-of-characters-within-the-string-in-python)** helps. Basically, use Collections. – 86BuickRegal Nov 28 '22 at 22:08