Write a function min pal that consumes a non-empty string s and uses dy-
namic programming to determine the minimum number of non-empty palindromes into
which s can be partitioned. For example, min pal("ab") should produce 2, as "ab" is
partitioned into the palindromes "a" and "b", and min pal("bbbabaaa") should produce
3, as "bbbabaaa" can be partitioned into the palindromes "bb", "bab", and "aaa" or into
the palindromes "bbb", "aba", and "aa".
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here