Microsoft Interview Question

string manipulation using dynamic programming or brute force