Problem 2: (5 + 2 points) We will call a word palindrome if it is symmetric. For example, "ababa" and "abcba" are palindromes, while "abcde" is not. Design an algorithm that finds the number of ways to cut a given word into palindromes of length more than one using O(n) operations, where the length of the word is n. For example, "aabbaabbaa" can be cut into "aabbaa" + "aabbaa" or "bb" + "aa", and just "aabbaabbaa". So the answer will be 5. (Challenge: try to do it in O(n) operations)