AppDynamics Interview Question

string manipulation questions language specific and medium level DP problem.