Given a sequence of characters, you are asked to find the longest palindrome within it. There is a catch: the palindrome can be built by jumping over certain letters as long as it is in order. For example for the string
havannah
, the hiden palindrome would be:
A string might have more than one such hidden palindrome. For example ,alfalfa has four hidden palindromes of length : 'alala', 'afafa', 'alfla','aflfa'
Find the length of the longest hidden palindrome for the following string.