@Anil: I will request you to completly explain the things. Not just
write a bit of code. So what is map and how are
you implementing the insert operation.
---------- Forwarded message ----------
From: Anil C R <[email protected]>
Date: Mon, Aug 31, 2009 at 7:59 PM
Subject: [algogeeks] Re: String- Anagrams.
To: [email protected]
If you have time for pre-processing, you can do this:
for each string t in dictionary:
s = sort(t)
map[s].insert(t)
so for printing anagrams of x, we'd just print the contents of map[sort(x)]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---