updated palindrome min cut