Can someone help me with a solution for finding the minimum count of palindromes in which the given string can be split into?
example:
abcdef = 6 //the palindromes are (a,b,c,d,e,f)
bbbaxx = 3 //(bbb, a, xx)
level = 1 // (level)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
using recursion with dynamic programming
if the string is a palindrome then result is one,
otherwise you split your string in 2 (have to do it foe every pair) and return the mininimum sum of the two call of minPalinCount on each part.
in pseudo code you have something like this
in c++