act: cat act tac
dgo: dog
eggloo: google
eilnst: listen silent enlist inlets
Anagrams share the same sorted letters, so they land under the same key. Here operator[] creating an empty vector on first use is exactly what we want.
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!
We use Google Analytics cookies to see how LearnFrenzy is used and make it better, and Google AdSense to keep it free.
No analytics or ad cookies are set until you accept. Privacy Policy
·
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!