Mapped String problem

I am able to implement the code for the problem please help me out.

Please provide the link to your code