We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Happy Ladybugs
Happy Ladybugs
Sort by
recency
|
521 Discussions
|
Please Login in order to post a comment
I thought about using a map to count the letters, but even then I would have to know when the letters would be out of order and there would be no space to sort them. I chose to simply count how many consecutive letters are present after sorting the array (if there is free space for that)
Here is my c++ solution, you can watch the explanation here : https://youtu.be/khDcPEl6to0
C++ Solution: