Everything is a palindrome

Any string can be imagined as a sequence of palindromes because one letter strings are technically palindromes. Let \(\text{PalComp}(s)\) be the minimum number of palindromes from which \(s\) can be constructed. What is the value of \(\text{PalComp}(s)\) of the following

1
s = "lralhnermakjfipkseokpqlsfjhasgcnpabmpflhiebsnsljjlmlijfnmasoqjeorinsenomsagafjlgklrjnjbmgmpcgkmkrlef"

Examples

  • \(\text{PalComp}\)("dadofanna") = \(4\) since "dadofanna"\(=\) "dad" \(+\) "o" \(+\) "f" \(+\) "anna".
×

Problem Loading...

Note Loading...

Set Loading...