I need to do a word wrap on a string using the dynamic programming method, I receive a const char* and return a formatted char*, can anyone help me?, It's the fisrt time I use dynamic programming and I don't understand how to use it in my problem.
I know how to do it using the greedy method, but I need to use DP method.