String and Dynamic Programming