Professor Byte cuts a string into the fewest palindromic pieces. Report that minimum number of pieces. Input: one lowercase string. Output minimum number of palindromic substrings covering it.
Example 1:
Example 2:
Example 3:
Constraints:
1≤length≤3000.
Tags:
