- 1
help to optimize code
Hello All, Below is my code: https://code.sololearn.com/ci4Oi24Lq3xb Request your view on the same in terms of robustness and optimization. Thanks a lot for your input in advance...!
2 Answers
0
No sorting required, do it in one pass, use appropriate data structure.
Not sure if your code is correct either, havenât really checked it
0
Hi Bobby Fischer , I also thought about sorting issue....
I could not decide as map don't allow duplicate entry but it does sort while inserting...
So I decided to go with multimap but again it would have duplicates and will have to go with count of each character to process...
Am I still missing something else ?