Amazon Interview Question

Some dynamic programming on words.