morse code

code
morse

#1

can some body tell me how to solve this problem …
http://www.codechef.com/CODEIT/problems/CIT04

it is based on morse code …and a good problem for learners…


#2

I have thought over it as using two map one like map<string,char > and map since both type of conversion are required …but i am not getting how to calculate the no of such string and how to print them in dictionary order…???
I am new in making codes ,it seem its a kind of dynamic problem …kindly suggest me the algorithm to solve it …