1mg Interview Question

String and dictionary based easy question