Everything is still a Palindrome
Every string is made up of palindromes. For example, the string papaya
can be formed in the following way :
1 2 3 

We need at least two palindromes to form papaya = pap + aya
. This file contains a string of length 1000. What is the minimum number of palindromes do we need to construct the string?
Here are 4 sample inputs and their corresponding output for clarification.
Sample Input
1 2 3 4 

Sample Output
1 2 3 4 

This is a followup of this problem.