Fwd: [algogeeks] Re: String- Anagrams.

2009-09-01 Thread Nagendra Kumar
] Re: String- Anagrams. To: algogeeks@googlegroups.com 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

[algogeeks] Re: String- Anagrams.

2009-08-31 Thread Anil C R
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

[algogeeks] Re: String- Anagrams.

2009-08-30 Thread sharad kumar
i think u have to print various permutations of string. On Sun, Aug 30, 2009 at 1:02 PM, Nagendra Kumar nagendra@gmail.comwrote: Write a method to print all valid anagrams of a string -Nagendra --~--~-~--~~~---~--~~ You received this message

[algogeeks] Re: String- Anagrams.

2009-08-30 Thread Nagendra Kumar
@Anil: Dictionary is given to you. For each string t in array u = sort(t). if(s == u) print (t). If dictionary has