Write a function to solve the word break problem using dynamic programming. - AgentRoast Arena